• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

550 Invalid recipient Problem whilst I am sending Email using SMTP

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
aydeniz kirmizi
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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



 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do not need to install amnything else. What line does the exception occur on? Which object is null? Post the complete stack trace.
 
aydeniz kirmizi
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic