No you don't need to use services like mailchimp at all. You can create your own HTML emails fairly painlessly if you know a bit of PHP and HTML.
Here is a simple block of code that will send a HTML email (I'll do it as a regular function, but in practice you'll want to use OO really).
function send_html_email($toEmail)
{
// $toEmail, passed to the function, is who the email is being sent to
// You might want to pass the subject and message itself to the funtion to0,
// by modifying it like so: send_html_email($toEmail, $subject, $messageText)
// Set the basic email variables, if you are passing stuff like subject in you
// won't set the subject. Also normally your fromEmail and fromName will be
// set in a configuration file or fetched from some system settings.
$fromEmail = "you@example.com";
$fromName = "Your Name";
$subject = "An email, in HTML, just for you";
// Now set the headers
$headers = "From: " . $fromEmail . "\r\n";
$headers .= "Reply-To: " . $toEmail . "\r\n";
$headers .= "CC: \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
// Now we need to create the message content, if you are passing messageText in,
// this step will be slightly different
$messageText = "Here is your message"; // This may be passed in, or just not used at all
$emailContent = '
<html>
<head>
<title>' . $subject . '</title>
</head>
<body>
' . $messageText . '
</body>
</html>
';
// Send the email
mail($toEmail, $subject, $emailContent, $headers);
/*
Some Notes:
1. You can include/set CSS in the <head></head> area for styling
2. You can use HTML freely in the <body></body> area, of course images and such will be fetched from your server
like: <img src="http://yourdomain.com/emailimage/someimage.jpg" alt="Some Image" />
3. You can set the from and to headers like so: $fromName <$fromEmail>
4. There is also the phpMail library which you might want to look at
*/
return 0;
}
Also if you are sending many emails you will want to batch them, so to keep things round...
You need to send 1000 emails, you do 10 batches of 100. But that may be complicating things.
This post has been edited by FizixRichard: 02 February 2012 - 01:41 PM