aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Can not send mail to other mail server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Can not send mail to other mail server" Watch "Can not send mail to other mail server" New topic
Author

Can not send mail to other mail server

Paul Okeke
Ranch Hand

Joined: May 16, 2009
Posts: 58


I use the code above to send mail with my local machine but the problem comes when I Uncomment path of the commented lines in other to send mail to the my yahoo and gmail account respectively:

My attempt to yahoo server gives:


javax.mail.MessagingException: Could not connect to SMTP host: yahoo.com, port:25, response: 421;
.....
.....

While my attempt to gmail server gives:

javax.mail.MessagingException: Could not connect to SMTP host: gmail.com, port:25;
.....
.....

Please let somebody help me check if there is something that am not getting right?
I use Apache Jamas Mail Server,
Thank for your help


OCJP 1.6
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19783
    
  20

http://answers.yahoo.com/question/index?qid=20090318021519AALoBCr
http://mail.google.com/support/bin/answer.py?hl=en&answer=13287

In other words, you cannot use "yahoo.com" or "gmail.com" - you must use their sub domains that are specifically set up for SMTP.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Paul Okeke
Ranch Hand

Joined: May 16, 2009
Posts: 58
Actually, I don,t mean configuring my GMail non Yahoo account.

This is my situation,

I have Apache James Mail Server installed on my Local Machine. I also have internet connection which I use to try my code for communication between my local mail server and remote servers like GMail and Yahoo.

So far, things works fine on my local server but I issues arises when I tried access to a remote server like GMail/Yahoo with the code in my previous post and got


Now, I observed that I don't need uncomment either lines 5 or 6 in order to send mail to remote server.
Sending mail with either line 13 or 14, the message sends successfully with out any error.
BUT, unfortunately the message never get delivered to the Yahoo/Gmail Account.

Please Your Help will be high apreciated. I have researched alot for a solution without success.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can not send mail to other mail server