Jump to content


Photo

Mail Formatting


  • Please log in to reply
1 reply to this topic

#1 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 28 June 2006 - 10:39 PM

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


?>

#2 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 29 June 2006 - 01:40 PM

If that was a copy paste, then your mail() function is a bit buggered
Change:
$MAILSENT = mail($MYADDRESS, $SUBJECT, $MAILMESSAGE, $MAILEADER);

To
$MAILSENT = mail(NULL, $SUBJECT, $MAILMESSAGE, $MAILHEADER);

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 ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users