Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java HTML
I have to send a html content as email. html contains file contains images,links,date,name etc.
But for each recipient, the name in html field will be his own name. And date will change in each day. And the html links will also get changed each day.
It is not possible to manually change it everyday?
And I am using a java program to send the bulk mail, written by me.
Is there any way to send such html email?
How can set date automatically each day?
And how can change the new link by a GUI created using java?
Posted 1-Feb-13 0:50am
gavkk1.6K
Comments
agav at 2-Feb-13 1:25am
   
Is it possible to do by using xml,xsl,xslt etc?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You just need to read the content and modify it for the different recipients and links. Create a template file so that you can locate individual fields and add the correct information at those points in the message before sending it.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You should use the JAVA Mail API for that. It's suitable.
 
Here are some Tutorials and helpful links:
 
Fundamentals on the JavaMail API[^]
Was on oracle server, don't know why they do not host it any more. Great source.
 
All About Java Mail[^] @ scribd.com
 
I can recommend to start with sending simple text messages, then to extend the SMTP to send HTML Messages, then add Attachments.
 

Please use a local Email Server for Development and Testing. HmailServer [^] is free and runs on any Windows machine. Please be aware of the auto-ban option in that, disabling that in the settings can save a lot of nerves and time.
 
Thunderbird portable[^] is a simple Email client which you can use for development / testing. It's compact and this way you will have your normal emails completely separated from the development.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 335
1 Peter Leow 135
2 Zoltán Zörgő 130
3 Afzaal Ahmad Zeeshan 115
4 DamithSL 100
0 Sergey Alexandrovich Kryukov 7,442
1 OriginalGriff 5,996
2 Peter Leow 4,292
3 CHill60 2,858
4 Mika Wendelius 2,850


Advertise | Privacy | Mobile
Web04 | 2.8.150224.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100