Jump to content

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


?>
Link to comment
https://forums.phpfreaks.com/topic/13159-mail-formatting/
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 ;)
Link to comment
https://forums.phpfreaks.com/topic/13159-mail-formatting/#findComment-50819
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.