Closed arl9114 closed 9 years ago
Hi there, Thanks for developing this great package! Unfortunately I'm facing the following error when trying to send an email via gmail:
Error in ls(envir = envir, all.names = private) : invalid 'envir' argument
Below is my error details (id/password are masked for security purposes). Could you help me troubleshoot? Thank you!
23: ls(envir = envir, all.names = private) 22: getFields.Object(x, ...) 21: getFields(x, ...) 20: names.Object(x) 19: names(x) 18: match(x, table, nomatch = 0L) 17: name %in% names(x) 16: $.Throwable(c, "message") 15: c$message 14: conditionMessage.condition(cond) 13: conditionMessage(cond) 12: stop(list(message = "org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465", call = .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, .jcast(if (inherits(o, "jobjRef") || inherits(o, "jarrayRef")) o else cl, "java/lang/Object"), .jnew("java/lang/String", method), j_p, j_pc, use.true.class = TRUE, evalString = simplify, evalArray = FALSE), jobj = <S4 object of class "jobjRef">)) 11: .Call(RJavaCheckExceptions, silent) 10: .jcheck(silent = FALSE) 9: .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, .jcast(if (inherits(o, "jobjRef") || inherits(o, "jarrayRef")) o else cl, "java/lang/Object"), .jnew("java/lang/String", method), j_p, j_pc, use.true.class = TRUE, evalString = simplify, evalArray = FALSE) 8: .jrcall(x, name, ...) 7: email$send() 6: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4: tryCatchList(expr, classes, parentenv, handlers) 3: tryCatch(..., Throwable = function(e) { if (!is.jnull(e$jobj)) { print(e$jobj$printStackTrace()) stop(paste(class(e)[1], e$jobj$getMessage(), sep = " (Java): "), call. = FALSE) } else stop("Undefined error occurred! Turn debug mode on to see more details.") }) 2: .jTryCatch(email$send()) 1: send.mail(from = "xxxx", to = c("xxxx"), replyTo = c("Reply to someone else "), subject = "Subject of the email", body = "Body of the email", smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "xxxx", passwd = "xxxx", tls = TRUE), authenticate = TRUE, send = TRUE)
$.Throwable
Managed to solve this issue somehow after changing "tls=TRUE" to "ssl=TRUE". Please close this issue, thanks!
Hi there, Thanks for developing this great package! Unfortunately I'm facing the following error when trying to send an email via gmail:
Error in ls(envir = envir, all.names = private) : invalid 'envir' argument
Below is my error details (id/password are masked for security purposes). Could you help me troubleshoot? Thank you!
23: ls(envir = envir, all.names = private) 22: getFields.Object(x, ...) 21: getFields(x, ...) 20: names.Object(x) 19: names(x) 18: match(x, table, nomatch = 0L) 17: name %in% names(x) 16:"),
subject = "Subject of the email", body = "Body of the email",
smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "xxxx",
passwd = "xxxx", tls = TRUE), authenticate = TRUE,
send = TRUE)
$.Throwable
(c, "message") 15: c$message 14: conditionMessage.condition(cond) 13: conditionMessage(cond) 12: stop(list(message = "org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465", call = .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, .jcast(if (inherits(o, "jobjRef") || inherits(o, "jarrayRef")) o else cl, "java/lang/Object"), .jnew("java/lang/String", method), j_p, j_pc, use.true.class = TRUE, evalString = simplify, evalArray = FALSE), jobj = <S4 object of class "jobjRef">)) 11: .Call(RJavaCheckExceptions, silent) 10: .jcheck(silent = FALSE) 9: .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, .jcast(if (inherits(o, "jobjRef") || inherits(o, "jarrayRef")) o else cl, "java/lang/Object"), .jnew("java/lang/String", method), j_p, j_pc, use.true.class = TRUE, evalString = simplify, evalArray = FALSE) 8: .jrcall(x, name, ...) 7: email$send() 6: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4: tryCatchList(expr, classes, parentenv, handlers) 3: tryCatch(..., Throwable = function(e) { if (!is.jnull(e$jobj)) { print(e$jobj$printStackTrace()) stop(paste(class(e)[1], e$jobj$getMessage(), sep = " (Java): "), call. = FALSE) } else stop("Undefined error occurred! Turn debug mode on to see more details.") }) 2: .jTryCatch(email$send()) 1: send.mail(from = "xxxx", to = c("xxxx"), replyTo = c("Reply to someone else