permaculture playing cards*
The moose likes Other JSE/JEE APIs and the fly likes com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay" Watch "com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay" New topic
Author

com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

I am trying out an example from sun's site for sending mail to my gmail id but it gives me error:







and compiled it

C:\javamail-1.4.2\javamail-1.4.2\demo>java MailExample 10.244.100.220 rtabassum@
moalajah.ae ruquiatabassum@gmail.com
Exception in thread "main" javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay
for ruquiatabassum@gmail.com

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1446)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:736)
at javax.mail.Transport.send0(Transport.java:191)
at javax.mail.Transport.send(Transport.java:120)
at MailExample.main(MailExample.java:37)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to rel
ay for ruquiatabassum@gmail.com

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1297)
... 4 more




My outlook is configured to send mails to gmail id but why from here i am unable to send mail to gmail id. Please suggest me .
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Can you send emails using the same mail server and To and From addresses from a different application like Outlook, Outlook Express or Mozilla Thunderbird? I highly doubt it, and that would mean the SMTP server is not set up properly.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay