Hi, don't know if this is the right place to post it, but hope someone
can help.
I'm trying to set up an app which sends emails to users who signs up.
I want to use my Google Apps account which i have connected to my
domain to send the emails through Google SMTP-server.
I have had successful attempts if i use my
busi...@gmail.com account,
but i get trouble when i try to authenticate with my
ad...@business.com account (which is set up with Google Apps, can use
this username to log onto gmail).
This is my mail configuration:
# WORKING
mail.smtp.host=
smtp.gmail.com
mail.smtp.user=
busi...@gmail.com
mail.smtp.pass=password
mail.smtp.channel=ssl
mail.smtp.port=465
mail.debug=true
# NOT WORKING
mail.smtp.host=
smtp.gmail.com
mail.smtp.user=
ad...@business.com
mail.smtp.pass=password
mail.smtp.channel=ssl
mail.smtp.port=465
mail.debug=true
My error message:
Mail error
A mail error occured : Error while sending email
play.exceptions.MailException: Error while sending email
at play.libs.Mail$2.call(Mail.java:181)
at play.libs.Mail$2.call(Mail.java:173)
at java.util.concurrent.FutureTask
$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.commons.mail.EmailException: Sending the email
to the following server failed :
smtp.gmail.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:
1242)
at org.apache.commons.mail.Email.send(Email.java:1267)
at play.libs.Mail$2.call(Mail.java:178)
... 6 more
Caused by: javax.mail.AuthenticationFailedException: 535-5.7.1
Username and Password not accepted. Learn more at
535 5.7.1
http://mail.google.com/support/bin/answer.py?answer=14257
n3sm2098755bka.16
at com.sun.mail.smtp.SMTPTransport
$Authenticator.authenticate(SMTPTransport.java:648)
at
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:
583)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:
1232)
... 8 more
~ ...
Hope someone has the answer :)