Jump to content

Strange ï¿∏ characters appearing in email sent from website


blastbum

Recommended Posts

Hi,

 

For some weird reason I am getting strange characters such as ï¿∏ appearing in emails sent out from a website my company has just developed. The script that is sending the email is the following:

 

<?php
$to  = $email; // atención a la coma

$subject = 'Client Registration - Xxxx Xxxxxxxxxx';

$message = 'Dear '.$first_name.',<br>
<br>
We recently sent you an email to announce our new website with particular reference to your financial and classing data statements.<br>
<br>
Our website has information about the XXXXX Group, our contact details, including our regional Agents, market and price information, along with your personal financial documents such as Recipient Created Tax Invoices and Classing Data.<br>
<br>
By providing this information on-line, you will be able to access your personal information relating to business with Xxxxx more efficiently. However, if you would like to receive your statements via an alternative method, please don’t hesitate to contact us.<br>
<br>
This email is to confirm that you now have access to the section of our new website.<br>
<br>
Your details are:<br>
Your Email: '.$email.'<br>
Your Username: '.$username.'<br>
Your Password: '.$password.'<br>
<br>
Please keep these details safe as they provide direct access to your personal information. If you have any questions or issues accessing our site or your information, please contact me directly. Thank you for your business and we hope we can continue our commercial relationship going forward.<br>
<br>
Yours Sincerely,<br>
Joe Bloggs<br>
Director<br>
<br>
15 Sample Street | Sample City<br>
Tel: +xx xxxx xxxxx | Mobile: +xx xxxx xxxxx | Fax: +xx xxxxx xxxxxx<br>
Email: [email protected] Web: http://www.xxxxxxxx.com/
';


$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//$headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
$headers .= 'From: Sample Company <[email protected]>' . "\r\n";
//$headers .= 'Cc: [email protected]' . "\r\n";
$headers .= 'Reply-To: [email protected]' . "\r\n";

// Mail it
if (@mail($to, $subject, $message, $headers)){
$_SESSION['msg'] .= 'Email Sent to the new client.';
}
else {
$_SESSION['msg'] .= 'Email Failed.';
}	
?>

 

 

Can anybody see why these strange ï¿∏ characters are appearing?

 

Many thanks for your help.

 

Dan

Hi,

 

Thanks for your reply.

 

See the below email to see where the characters are appearing:

 

Dear Xxxxxx,

 

We recently sent you an emailï¿∏to announce our new websiteï¿∏with particular reference to your financial and classingï¿∏dataï¿∏statements.

 

Our website has information about the Xxxxx Group, our contactï¿∏details, including our regionalï¿∏Agents, market and price information, along with your personal financial documents such asï¿∏Recipient Created Tax Invoices and Classing Data.

 

By providing this information on-line,ï¿∏you will be able to access your personal informationï¿∏relating to business with Xxxxxxï¿∏more efficiently. However, if you would like to receive your statements via an alternative method, pleaseï¿∏donï¿∏t hesitate to contact us.

 

This email is to confirm that you now have access to the section of our new website.

 

Your details are:

Your Email: [email protected] <mailto:[email protected]>

Your Username: [email protected] <mailto:[email protected]>

Your Password: xxxxxxxxx

 

Please keep these details safeï¿∏as they provideï¿∏direct access to your personal information. If you have any questions or issues accessing our site or your information, please contact meï¿∏directly. Thank you for your business and we hope we can continue our commercial relationship going forward.

 

Yours Sincerely,

Joe Bloggs

Director

 

15 Sample Street | Sample City

Tel: +xx xxxx xxxxxï¿∏| Mobile:ï¿∏+xx xxxx xxxxx | Fax: +xx xxxx xxxxx

Email:ï¿∏[email protected] Web: http://www.xxxxxxxx.com/

 

 

Any ideas anybody?

Hi.

 

I'm using Adobe Dreamweaver CS4 as my HTML editor and I'm viewing the email with Microsoft Entourage. However, that said, it was my client who brought this to my attention and he uses a PC.

 

If anyone else could shed more light on this issue I would greatly appreciate it. Thanks.

 

Dan

Not knowing what your session variable does, I changed your code to this and it works fine.  I ran into a header problem with Dreamweaver adding those characters at the beginning of the file but not viewable in Dreamweaver but visible in Notepad. I found empty lines at the beginning of the file caused it.

 

if (@mail($to, $subject, $message, $headers)){
echo "Mail Sent";
}
else {
"Mail Not Sent";
}

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.