er.javamail.centralize=true
er.javamail.adminEmail=email@hidden
er.javamail.smtpHost=smtp.googlemail.com
er.javamail.smtpAuth=true
er.javamail.smtpUser=email@hidden
er.javamail.smtpPassword=mypassword
er.javamail.debugEnabled=true
----Java code----
public void sendMail()
{
try {
ERMailDeliveryPlainText message = new ERMailDeliveryPlainText();
message.setTextContent(this.mailBody());
message.setSubject(this.mailSubject());
message.setToAddress("email@hidden");
message.setFromAddress("email@hidden");
message.sendMail(true);
} catch (Exception e) {
log.error(Utilities.stackTraceToString(e));
}
}
----The ERJavaMail debug and stack trace output---
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.googlemail.com", port 25, isSSL false
220 mx.google.com ESMTP d10sm3672183obk.1 - gsmtp
DEBUG SMTP: connected to host "smtp.googlemail.com", port: 25
EHLO Oscar-Gonz-lez-Mac-Book-2.local
250-mx.google.com at your service, [201.205.54.84]
250 SIZE 35882577
DEBUG SMTP: Found extension "SIZE", arg "35882577"
DEBUG SMTP: use8bit false
MAIL FROM:<email@hidden>
530 5.7.0 Must issue a STARTTLS command first. d10sm3672183obk.1 - gsmtp
DEBUG SMTP: got response code 530, with response: 530 5.7.0 Must issue a STARTTLS command first. d10sm3672183obk.1 - gsmtp
RSET
250 2.1.5 Flushed d10sm3672183obk.1 - gsmtp
com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. d10sm3672183obk.1 - gsmtp
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1668)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1207)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:735)
at er.javamail.ERMailSender._sendMessageNow(ERMailSender.java:254)
at er.javamail.ERMailSender.sendMessageNow(ERMailSender.java:191)
at er.javamail.ERMailDelivery.sendMail(ERMailDelivery.java:604)
at com.tec.apc.ApcFormSolicitud.sendMail(ApcFormSolicitud.java:28)
at com.tec.ap.components.manenimientos.FinanciamientoForm.enviar(FinanciamientoForm.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636)
at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
at com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java:70)
at er.extensions.foundation.ERXPatcher$DynamicElementsPatches$SubmitButton.invokeAction(ERXPatcher.java:203)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:218)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:38)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079)
at er.extensions.components.ERXComponent.invokeAction(ERXComponent.java:116)
at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:127)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079)
at er.extensions.components.ERXComponent.invokeAction(ERXComponent.java:116)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1357)
at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1745)
at er.extensions.appserver.ajax.ERXAjaxApplication.invokeAction(ERXAjaxApplication.java:122)
at er.extensions.appserver.ERXApplication.invokeAction(ERXApplication.java:1979)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268)
at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302)
at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:377)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2100)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2065)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:680)
QUIT
Thanks in advance