Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
rg.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
javax.mail.MessagingException: can't determine local email address
	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1001)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
	at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:402)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:341)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:337)
	at utility.SendMail.sendMail(SendMail.java:66)
	at webService.DeviceInfoMailSenderThread.sendMail(DeviceInfoMailSenderThread.java:395)
Posted
Updated 1-Feb-13 2:40am
v3
Comments
Richard MacCutchan 1-Feb-13 8:41am    
What is the sender address of the message? Please edit your question and show the code you are using to create and send the message.

There is a lot of information here[^]. without seeing your code, I can't help further, however I would check you have set the FROM address on the message; that's the local e-mail address.
 
Share this answer
 
Your email is set up false, the from address is not right. Therefore the message cannot be send. there must be some address - not a valid one, but there must be some.

Please refer to these documentations:

Fundamentals on the JavaMail API[^] (PDF)

Email through Java[^] (website)

All about JavaMail[^] (Scribd.com)

All 3 of them have good tutorial style explanation on how to create a valid email.

Please also do NOT use a web email account for testing. Those will block/ban you after a few attempts.
It's much better o use a local email server on your development system. Please refer to the free HMailServer[^], which is simple to operate and great for developing message handling systems. be aware that also this one has a auto-ban option - you can switch it off in the preferences.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900