Re: Characters missingin mail source???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 10/06/2003 06:40 AM, Disko_kex wrote:
I've got this annoying problem. I made a program that sends mail to my
customers, like a newsletter. The mail is in HTML and each mail is about
2000 chars, depends on the customers info. The problem I have is that
there is a lot of characters missing in the mail source when the mail is
delivered.

Ex:
"<tr><td>2003-03-03</td></tr>"

shows like this in the email source "tr><td>203-03-03</td/tr>"   there
is no logical structure for which characters is missing, it's different
everytime. Im running apache 1.3.28 and PHP 4.3.3, I tried IIS with PHP
4 and 5 with the same result.

The source for the mail is stored in a normal $message = array(); where
$message[$id]; is the mail source for the specific customer. If I print
$message[$id] from the program everything show correctly.

mail($mail_to, $subject, $message_head.$message[$key].$message_foot,
			 "From: Redaktionen
<redaktionen@lokalguiden.se>\r\n"
			."MIME-Version: 1.0\r\n"
			."Content-type: text/html;
charset=iso-8859-1\r\n"
			."Reply-To: redaktionen@lokalguiden.se\r\n"
			."X-Mailer: PHP/" . phpversion());	
Should I change something?


Any idea what I should do??

You need to properly encode your messages so they can pass in e-mail gateways that filter non-ASCII characters. For HTML messages usually you need to encoded with quoted-printable.


You may want to try this class to compose and send messages and can encode your message bodies properly. Just take a look at the supplied examples:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux