[FX.php List] How to send HTML emails in PHP

Jon Montgomery igsmasupport at igsmasouth.org
Thu Jan 24 14:02:39 MST 2008


Bob,
    how about just this, (understand that I use the plugin so I don¹t have
to write code so I may be way off base here)

Ob_start();

<img src="http://comparisons.advantastar.com/images/logo.jpg" width="376"
height="55" />

$body = ob_get_clean

And see what you get.

Jon Montgomery


On 1/24/08 2:24 PM, "Bob Patin" <bob at patin.com> wrote:

> Here's my PHP:
> 
> <?php
> ob_start();
> $body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
> $body = $body."\r\n".'<html xmlns="http://www.w3.org/1999/xhtml">';
> $body = $body."<head>";
> $body = $body.'<meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8" />';
> $body = $body.'<title>Untitled Document</title>';
> $body = $body.'</head>';
> $body = $body.'<body>';
> $body = $body.'<img src="http://comparisons.advantastar.com/images/logo.jpg"
> width="376" height="55" />';
> $body = $body.'</body>';
> $body = $body.'</html>';
> 
> $body = ob_get_clean();
> 
> //SOCK MAIL FUNCTION
> include_once('mail_function.php');
> 
> $to="bob at patin.com";
> $from="info at longtermsolutions.com";
> $subject="Web Inquiry";
> $replyto=$from;
> sock_mail(1, $to, $subject , $body, $replyto , $from);
> 
> ?>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20080124/c88399e1/attachment-0001.html


More information about the FX.php_List mailing list