natalieG Posted June 28, 2006 Share Posted June 28, 2006 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?> Quote Link to comment https://forums.phpfreaks.com/topic/13159-mail-formatting/ Share on other sites More sharing options...
SharkBait Posted June 29, 2006 Share Posted June 29, 2006 If that was a copy paste, then your mail() function is a bit buggeredChange: [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 ;) Quote Link to comment https://forums.phpfreaks.com/topic/13159-mail-formatting/#findComment-50819 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.