I am using java to send mail.
I want to set the from mail id to [email protected].
When i am using that for sending mail the following exception is generated..
Exception in thread "main" javax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connect(Service.java:322)
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 sendmailtoclient.SendSMTP.sendMail(SendSMTP.java:125)
at sendmailtoclient.SendSMTP.main(SendSMTP.java:153)
I have used the correct password for the mail account.
although it I have used the [email protected] successfully.
If you have code please post to me.
Please help me.
Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…