| Author |
Automatic mail sender
|
S.L.Narayanan
Ranch Hand
Joined: Apr 01, 2005
Posts: 431
|
|
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.
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, NEXT--->IBM XML
|
 |
Gian Franco
blacksmith
Ranch Hand
Joined: Dec 16, 2003
Posts: 975
|
|
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
|
"Eppur si muove!"
|
 |
S.L.Narayanan
Ranch Hand
Joined: Apr 01, 2005
Posts: 431
|
|
Thanx dude I have sent a private message to you with all the required details. Can you help me out?
|
 |
 |
|
|
subject: Automatic mail sender
|
|
|