mail task results in authentication failure when using gmail as smtp server

jason mazzotta <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <CAKUHh8y3yJ=PH_25bvdu_GYQio0KOgou07RMQ5MN8sW2tmc-eg@mail.gmail.com>
To whom it may concern,
        I am trying to use gmail as an smtp server with the ant mail task.
I have set up the task as follows:


<mail

         user="e-mail address"

         password="password"

         ssl="yes"

         mailhost="smtp.gmail.com"

         mailport="465"

         subject="Nightly unit test results">

         <to address="e-mail address" />

         <from address="e-mail address" />

         <message src="/Directory/On/My/Machine" />

</mail>


This worked a few months ago, but these days, when I run my ant build file
I get the follow error:


Failed to send email: 534-5.7.14 <
https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbtAR

     [mail] 534-5.7.14
Xr2YD-ghKP2iyh466DE7nVr1n5WwF5lf7k8MZzGM9T0VI3UPNNsjR5PyjPoJtKhjlVBPSo

     [mail] 534-5.7.14
QTLSBT8z20kqwuU1vVfnG1Bg0dheJTuXClSawq1aReyb47UeIFbXqvr2l_2JjEwe3eXJAh

     [mail] 534-5.7.14
5tgRqrzCiTDdCwJRm-Tgk7h3uKvQ4u_yPW6da7yORpot1RULSt4Sb3xk_GErdyZbmuurF9

     [mail] 534-5.7.14 ILExbCY-gsmeNMVjcx55lv4ZOczA> Please log in via your
web browser and

     [mail] 534-5.7.14 then try again.

     [mail] 534-5.7.14 Learn more at

     [mail] 534 5.7.14
https://support.google.com/mail/bin/answer.py?answer=78754
n34sm1388141qge.27 - gsmtp

Do I need to loosen the security settings on my gmail account or are there
other properties I need to set in the mail task to prevent the
authentication error?

Thanks,

Jason Mazzotta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.