Jump to content

Recommended Posts

Hi,

 

I am sending mails through PHP to our customers using the below demonstrated Code

 

	$headers = "From: ". $cc_support_mail ."\r\n";
$headers .= "BCC: " .  $email_ids ."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid("HTMLDEMO");
$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";
$body = "--$boundary\r\n" .
"Content-Type: text/plain; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$body .= "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$body .= chunk_split(base64_encode($return_html));
mail($toemail, $mail_booking_4 , $body, $headers);

 

This code sends emails to our customers. This email is shown properly in Yahoo and Gmail.

This email is contains HTML Text which shown properly in YAHOO and GMAIL..

Where as, in some other mail servers, these email is shown in some encrypted format. Below is content shown ..

 

PHRhYmxlIGNlbGxwYWRkaW5nPTQgY2VsbHNwYWNpbmc9NCBib3JkZXI9MD48dHI+PHRkPjx0YWJs

ZSB3aWR0aD0iMTAwJSIgYm9yZGVyPTAgIGNlbGxwYWRkaW5nPTAgY2VsbHNwYWNpbmc9MCA+PHRy

Pjx0ZCA+PGZvbnQgc2l6ZT0zIGNvbG9yPWJsdWU+PGI+R2VudGlsZSBTaWcuIENvcnJhZG8gUmFj

Y2E8YnI+PGJyPkxhIHJpbmdyYXppbyBwZXIgbGEgcHJlbm90YXppb25lLjxicj48YnI+VHJvdmVy

ZXRlIHF1aSB0dXR0aSBpIGRldHRhZ2xpIGRlbGxhIHR1YSBwcmVub3RhemlvbmU6IDxicj48YnI+

TnVtZXJvIGRpIGNvbmZlcm1hOjwvYj4gQ1JCQ0tORDJTMEFINTVBNSZuYnNwOyZuYnNwOzxiPkRh

dGE8L2I+MjIvMDkvMjAwOCZuYnNwOyZuYnNwOzxiPk9yYXJpbzogPC9iPiAwNzoyNSBhbTwvZm9u

dD48L3RkPjwvdHI+PC90YWJsZT48L3RkPjwvdHI+PHRyPjx0ZD48dGFibGUgd2lkdGg9IjEwMCUi

IGJvcmRlcj0wICBjZWxscGFkZGluZz0wIGNlbGxzcGFjaW5nPTAgPjx0cj48dGQgYWxpZ249bGVm

dCBzdHlsZT0iaGVpZ2h0OjI1cHgiIGJnY29sb3IgPSAjNjZDQzY2ID48Zm9udCBmYWNlPSJDZW50

dXJ5IEdvdGhpYyIgc2l6

 

I dont understand the same email shown differently in two different mails.

 

Kindly help me to find a solution to this problem

 

Thank You

Santosh

Link to comment
https://forums.phpfreaks.com/topic/125305-help-needed-for-php-mail/
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.