To create Newsletter email Template:

<?php

    $to = "youremail@domain.com";
    $from = "homedomain.com";
    $subject = "Newsletter E-mail";
    $message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Bahamas::</title>
<style type="text/css">
</style></head>

<body>
<table width="667" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td></td>
</tr>
</table>
</body>
</html>
';
    $headers  = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    mail($to, $subject, $message, $headers);

    echo "E-mail has been sent to..... !".$to;
?>




Note:  In Newsletter which you have to send on email.You have to give the absolute url addres as   domain.com/images/image.jpg.

No comments:

Post a Comment