This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes 550 Invalid recipient Problem whilst I am sending Email using SMTP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "550 Invalid recipient Problem whilst I am sending Email using SMTP" Watch "550 Invalid recipient Problem whilst I am sending Email using SMTP" New topic
Author

550 Invalid recipient Problem whilst I am sending Email using SMTP

aydeniz kirmizi
Ranch Hand

Joined: Aug 20, 2009
Posts: 38
Hello;

I am trying to send email to an valid email address with my application. I did not understand but, it keeps saying invalid recipient although the email address is valid.
I am sure there is no any problem about my codes, but it is about the free SMTP server that I am using. Do you have any idea how to configure the SMTP to allow it relaying? Or do you have any suggestion for another free SMTP server.

I will really appreciate any answer I will have...

Many thanks..
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

aydeniz kirmizi wrote:Do you have any idea how to configure the SMTP to allow it relaying?

Of course that depends on the server. Your best bet is to discuss that with the administrator of the server.
Ram Para
Ranch Hand

Joined: Jul 09, 2008
Posts: 50
Simply you can use Google SMTP Server.

Try this.



#You can change the properties
subject=Test Mail
mailtext=Happy birth day to you.
birthday-file=C:\\bdyprops\\birthdaylist.csv
fromMailAddress=

#Gmail UserID and password
#You can create any user on gmail and that will work.
smtp-user-id=
smtp-user-password=

#Dont touch the below properties as this program is specially configured for use with Gmail.
host=smtp.gmail.com
smtp_port=465


This is a small application which I used to send birthday mails abutomatically.


Ram Parashar
http://doinfinite.com
aydeniz kirmizi
Ranch Hand

Joined: Aug 20, 2009
Posts: 38
Hello;

I really appreciate that, you sent me your codes. I tried to implement your codes for my application, but now I have "null" exception.

Firstly could you please tell me, do I need any program to install a part from having a googlemail address?

Secondly, can you please check my codes below, so I can be sure if I had the right step.

Many thanks,

Looking forward to hearing from you..



here is my codes, that call the method:



and here is my JBoss log file



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41087
    
  43
You do not need to install amnything else. What line does the exception occur on? Which object is null? Post the complete stack trace.


Ping & DNS - my free Android networking tools app
aydeniz kirmizi
Ranch Hand

Joined: Aug 20, 2009
Posts: 38
Hello;

Thanks for the response. I add above the exceptions I am having in my my log file. Please notice my System.out.println lines in the codes.
It used to give null exception, because it was not going the lines after the MimeMessage. I redesigned and resubmitted my codes above,
I hope they are clearer..

Thanks
Ram Para
Ranch Hand

Joined: Jul 09, 2008
Posts: 50
Line 19 2009-09-20 14:42:17,390 INFO [STDOUT] DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false

I copy/paste your code its working fine I am able to send mails.
Check your code or server properties.
Seems to be as if somewhere default port has been configured because program is still trying to connect port 25.
aydeniz kirmizi
Ranch Hand

Joined: Aug 20, 2009
Posts: 38
Hey, It really worked) Thank you very much for your suggestion. OOOvv my God, I have been struggling with this problem for almost a week. Before I tried
to use too many things, but none of them worked. What I did is, just activating the fort 465.

here is the code. I hope, it is going to be helpful for someone else..




Thank you very very much..
aydeniz kirmizi
Ranch Hand

Joined: Aug 20, 2009
Posts: 38
I am sorry about disturbing you again but, I am having another problem now. I am trying to send email to and email list, consists from like just 5 emails.
The system does not give me any exceptions, but when I check the email addresses, I can not see any email has been sent. I checked my log file, and it says



Any idea? why it does not send the emails?

here is the log file:




any idea?

Thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 550 Invalid recipient Problem whilst I am sending Email using SMTP
 
Similar Threads
Sending mails from someone's address
error sending email to hotmail account
Space checking in a String
what is 530 authentication?
smpt java mail woes