• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Automatic mail sender

 
S.L.Narayanan
Ranch Hand
Posts: 431
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have a requirement like this. A java program should run always, which will check the dates from the database and based on the deadlines it should send mails with attachment(zip file) to appropriate email IDs.

Database part is pretty simple and I have coded them. Now I need to use Java mail API to send mails. But I never used it before.So can any one tell me about Java Mail API and how to send mails with attachments using it.

Also do I need to have any SMTP servers in my system?. If so, can anyone tell me some downloadable free SMTP servers which can be used for this purpose.

Advance thanks.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You don't need smtp servers on your system.

You could use any smtp server, for example
the one of your internet provider, for which
you should have a user name and a password.

You keep the details (user, password, delaytime,
etc.) regarding the mailserver in a properties
file. Open a session like this:


and start sending mails with the API's methods.

I have some additional info about sending attachments,
so if you'r interested send me a private post with
your e-mail adres.

Cheers,

Gian
 
S.L.Narayanan
Ranch Hand
Posts: 431
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx dude

I have sent a private message to you with all the required details. Can you help me out?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic