hi, i got a 'slight' problem in sending email to my own account at yahoo.com. here's the 'error' messages: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for jhun_kam@y ahoo.com at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at SendEmail.main(SendEmail.java:47) can anybody tell me the reason of this ? i'm sending my email through my own SMTP server at localhost. Thanks.
I think that "unable to relay" means that your local server does not recognize you as having an email account there. It thinks you are trying to send mail illegally. Try it with a from address that the local server knows. Bill
Ahhh, thank you very much, i got my problem solved now. The problem was that i didnt activate relaying ability from my SMTP server. Now a new problem arise, it's quit amusing. I was able to deliver emails to my account at firstname.lastname@example.org, but unable to deliver emails to my email@example.com. The code is the same. I only make a change in the recipient name(firstname.lastname@example.org into email@example.com). The program exits gracefully, no error nor warnings, but none of the messages arrived at my yahoo account. Any ideas, please ?
Hi, 1. From account should be a valid account on the yahoo server. 2. Yahoo mail server requires authentication, so set the property "mail.smtp.auth" to true. 3. To get debugging info call setDebug(true) on session object. Hope this helps.
Hi again, thanks for the help. I think i've found the culprit of my problem. It seems that if i want to send to yahoo mail, i must have a valid/registered domain in the internet. Setting the 'From' field to a hostname that is not registered in the internet will not be accepted by yahoo mail. (Strangely, hotmail will accept without further checking Thanks for the help, ranchers.