Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

Mail Formatting

Recommended Posts

The email does not show up as an html fpormatted page. are we doiung sopmething wrone here?
Thanks,
Milena

<?php
$SENDEMAIL=1;
if ($SENDEMAIL==1){
$SUBJECT ='PIMLogin';
$REPFIRM ='MSDS';
$SUPERVISOR ='DavidG';
$PASSWORD ='9999';
$MAILFONT ="<FONT FACE='Arial,Helvetica' color='Yellow' size='4'>";
$WHITEFONT ="<FONT FACE='Arial,Helvetica' color='white' size='4'>";
$MYADDRESS ='sales@msdsimaging.com';
$MSGRPLY ='david@salvadorimaging.com:';
$LOGINDATE =date('m-d-Y');

$MAILHEADER ="MIME-Version: 1.0\r\n";
$MAILHEADER .="Content-type: text/html; charset=iso-8859-1\r\n";
$MAILHEADER .="Content-Transfer-Encoding: 7bit\r\n";
$MAILHEADER .="From:$MYADDRESS\r\nReply-To:$MSGRPLY";

$MAILMESSAGE ="<HTML><HEAD><TITLE>LOGIN</TITLE></HEAD><BODY bgcolor=\"#dddddd\"><CENTER>";
$MAILMESSAGE .="<TABLE bgcolor=\"blue\">";
$MAILMESSAGE .="<TR><TD aliign=\"center\" COLSPAN=\"2\">$MAILFONT Login</TD></TR>";
$MAILMESSAGE .="<TR><TD>$WHITEFONT Repfirm: </TD><TD>$MAILFONT $REPFIRM</TD></TR>";
$MAILMESSAGE .="<TR><TD>$WHITEFONT Supervisor:</TD><TD>$MAILFONT $SUPERVISOR</TD></TR>";
$MAILMESSAGE .="<TR><TD>$WHITEFONT Password</TD><TD>$MAILFONT $PASSWORD</TD></TR>";
$MAILMESSAGE .="<TR><TD>$WHITEFONT Login Date: </TD><TD>$MAILFONT $LOGINDATE</TD></TR>";
$MAILMESSAGE .="</TABLE></BODY></HTML>";

$MAILSENT=mail($MYADDRESS,$SUBJECT,$MAILMESSAGE,$MAILEADER);
if ($MAILSENT){print 'MailOK';exit;} else {print 'MailErr';exit;}
}//SENDEMAIL=1


?>

Share this post


Link to post
Share on other sites
If that was a copy paste, then your mail() function is a bit buggered
Change:
[code]
$MAILSENT = mail($MYADDRESS, $SUBJECT, $MAILMESSAGE, $MAILEADER);
[/code]

To
[code]
$MAILSENT = mail(NULL, $SUBJECT, $MAILMESSAGE, $MAILHEADER);
[/code]

Also noticing that your not closing your <FONT> tags and your $MAILFONT is (I am assuming) missing the <FONT> tag as well.

Yes I can be picky with closing of HTML tags ;)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.