Jump to content

Email Confirmation Body Is Not Displaying In Emails????


dklbwf

Recommended Posts

Hello PHP Family,

 

I am basically having a issue with my confirmation email function, where when a member signs up on my site they do indeed receive a confirmation email but the body is not displaying. What's weird is it shows in gmail only with no problems at all...i have tried aol, yahoo, & hotmail and all 3 email addresses recieve blank confirmation emails....could my mail.php file be off somewhere or what else could it be??? I'm totally lost, not sure if its the mail.php file you want to see but if so here it is:

<?
$ntm3k_ncd_directive=$do_not_change;

function send_html($from, $to, $subject, $text, $html)
{
global $debug;
if ($debug) echo "<HR>DEBUG|From:$from|To:$to|Subject:$subject<HR>$text<HR>$html<HR>";
$headers = "From: $from\r";
$headers .= "Reply-To: $from\r";
$headers .= "X-Mailer: PHP/" . phpversion()."\r";
$headers .= "MIME-Version: 1.0\r"; 
$boundary = uniqid("MAB"); 
$headers .= "Content-Type: multipart/alternative" . 
   "; boundary = $boundary\r\r"; 
$headers .= "$text\r\r"; 
$headers .= "--$boundary\r" . 
   "Content-Type: text/plain; charset=ISO-8859-1\r" . 
   "Content-Transfer-Encoding: base64\r\r"; 
$headers .= chunk_split(base64_encode("$text")); 
$headers .= "--$boundary\r" . 
   "Content-Type: text/html; charset=ISO-8859-1\r" . 
   "Content-Transfer-Encoding: base64\r\r"; 
$headers .= chunk_split(base64_encode("$html")); 
mail($to, $subject, "", $headers); 
}

function parse_mail($mail, $param) 
{
foreach ($param as $key=>$val)
$mail=str_replace("#".$key."#",$val,$mail);
return $mail;
} 
?>

Thanks For Any Help N Advance!!

Altec said it best. phpMailer is a great solution for handling mail being sent out.  If you need help with setting it up, either post here (because you didn't begin with questions regarding how to send e-mail with phpMailer, I don't think anybody will hold it against you for asking questions about something we pointed you to), or send me a PM.

Thanks so much for responding....Im rather new to php and not sure what php mailer is...basically i purchased a php script program and i had to do was put on my server which i have done, everything is working great so far except for this confirmation email part....i just put in php mailer in google which took me to a download page on soundforge, i downloaded the zip file named PHPMAILER_v5.1.zip..not sure where to go from here

 

Thanks For Any Help!!

I think they left it blank becuase something else is being pulled to fill the body.....when i go to my gmail account this is the message i get:

Dear User !

 

Thank you for registering in our system.

Now you should go the link below to activate your membership account:

http://www.domain.com/confirm.php?mid=salley&stamp=1256837424

 

Your username is: salley

Your password is: password

 

But all the other email platforms display blank body messages?????  Do you think i need to somehow figure out how to bring that confirm address into that area you are saying is blank???

 

Thanks!!

The method the OP is using is inserting the body text using the headers, which is perhaps producing an only partly valid e-mail. I don't know enough about valid e-mail structure to say for sure. But as jonsjava points out, the easiest solution would probably be to remove the body text from the header and use the actual message body parameter.

Archived

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

×
×
  • 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.