Nice HTML Newsletter from a Domino Server
Requirement 1: Marketing wants to send a newsletter.
Solution: Create a new ID and a new Mailbox for marketing, teach them how they can use the mailbox. Solved.
Requirement 2: Marketing wants to send newsletters to a huge list of customers.
Solution: Improve the mailbox, so stationaries can be sent to a list of email addresses, in blocks of 100 each, so the provider does not mark us as spammers. Solved.
Requirement 3: Marketing wants to send nice looking newsletters to a huge list of customers.
Solution: Improve the agent, so it can send HTML files as MIME Mails using the NotesMime* classes. Solved.
Requirement 4: Marketing wants to send nice looking newsletters with pictures to a huge list of customers.
Analyisis: HTML from Marketing contains links to pictures on the internet/intranet. The script from requirement 3 would have to parse the html file, download all the images and replace the img src’s with the right cid’s and embedded these images in the mail.
Solution: Implementing Apache Commons Email Client the ImageHtmlEmail class does all the parsing, downloading and img tag updateing.
To run the agent on the server 2 jar files (javax.mail.jar, commons-email-1.4.jar) needs to be placed in the /jvm/lib/ext/ folder (otherwise you might have to fiddle around with the java.pol file) because the email client stores the images in the local temp directory. Restart the server/client so the jar’s get loaded.
The SMTP task needs to running and properly configured to allow connections.