Click here to Skip to main content
13,196,126 members (48,134 online)
Rate this:
 
Please Sign up or sign in to vote.
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 1-Feb-13 2:27am
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.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.171019.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100