Main Content

Of course I'll tell you by email

Archive - Originally posted on "The Horse's Mouth" - 2006-10-25 07:50:53 - Graham Ellis

It's about the time that I should be writing the next issue of "Of Course" - our twice yearly newsletter about Open Source training, and the news from Melksham and our training centre. But there's so much happening - with Well House Manor opening earlier this month, and with an initial 3 months 'running in' period - that I want to write to people with an intermediate update too, before "Of Course" comes out fresh and early in the first days of 2007.

Noticing that many emails have switched from text only into full HTML with pictures these days, I've decided to go the same route - but how? Well - I've been looking into it and here are the steps I've taken:

* Draft the HTML page to be sent, in a table around 600 pixels wide, and ensuring that ALL links are fully qualified.

* Write a PHP script to send out the email (much the easiest email client to use!) ensuring that extra "from", and "reply-to" headers are included.

* Add an extra header - "Content-type: text/html" to the email headers.

My particular script is looping through a short file of email addresses and names, and filling in each recipients name before sending. Great care is being taken NOT to run the script twice, and to delete it from the URL it's hidden at as soon as it has been run - after all, I certainly don't want to risk spamming people.

If you want to see a copy of my letter, it's on the web site here