$headers = "Content-type: text/html\n";
$fromEmail = urlencode( $dbQuery->adminEmail );
$subject = "Your new eStore is ready!";

$message = "<img src=\"somedomain.com/images/estore.jpg\"><br><br>::name::,
<br>Your new eStore is ready at <a
href=\"http://woodenpickle.com/shop\";>http://woodenpickle.com/shop</a>.<br>Y
ou can open the admin panel for it at the following link:<br><br><a
href=\"http://woodenpickle.com/shop/admin.php\";>
http://woodenpickle.com/shop/admin.php</a> <br><br>You should receive
another email with the temp login and pass later today.\n";

$result = mysql_query( "SELECT * FROM customers" );
while( $data = mysql_fetch_row( $result ) )
{
    print ". ";
    $newMessage = str_replace( "::name::", $data->firstName, $newMessage );
    $if( mail( $data->emailAddress, $subject, $newMessage, "${headers}From:
$fromEmail" ) )
        {
            $count++;
        }
}

echo( "Done." );



"Stefen Lars" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello all
>
> I have a script called 'report.php' that generates a report in HTML. This
> report must be created at regular intervals; hence I have set up a cron
job
> to call that script. The output of 'report.php' must be sent by e-mail. I
> use the following command:
>
> /usr/bin/lynx -source http://server.com/report.php | mail -s "Report"
> [EMAIL PROTECTED]
>
> This works fine. The result of report.php is sent to [EMAIL PROTECTED]
>
> However, the results do not appear as HTML in the e-mail client, but as
> text. This is due to the fact that the headers saying 'This is HTML' are
> missing from the e-mail message sent.
>
> Does anyone know how it is possible to get 'mail' to add suitable headers
to
> the above command, so that the receiving e-mail client knows that it is
> getting an HTML and not a text message?
>
> Any help would be gratefully received. TIA.
>
> S.
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to