469,904 Members | 2,131 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

Please help: Mail-Transfer encoding problem

Hi People !

I have an Urgent Problem and greatly appreciate your help:

My script sends multipart emails using the MAIL_MIME package from
pear.php.net Works great so far but.....

....Sometimes (depending on the mail server that handles the mailing)
all quotation marks in an HTML body of a multipart message become
escaped.

Example:

<form name="form1"> becomes <form name=\"form1\">

That of course cripples all HTML formatted emails. Strange enough:
On some servers the problem does not appear when the transfer-encoding
is "base64" instead of "quoted-printable". On others it does not
matter. I can't see any consistency and don't know how to solve the
problem.

Any ideas?

...ah...and does anybody know another mail packages similar to
MAIL_MIME in order to implement multipart email functionality in a php
script?

Thanks a ton all.
Jul 17 '05 #1
9 2127
Jerry wrote:
My script sends multipart emails using the MAIL_MIME package from
pear.php.net Works great so far but.....

...Sometimes (depending on the mail server that handles the mailing)
all quotation marks in an HTML body of a multipart message become
escaped.

Example:

<form name="form1"> becomes <form name=\"form1\">


http://www.php.net/stripslashes
JW

Jul 17 '05 #2
Hi Thank you.... but ...

The point is that all quotation marks are handed over to the mail
handler without the slashes. The slashes seem to be added somehow
during the mail process. The reason for me to think that is the fact
that the emails are OK when sent from one server but are crippled when
being sent from another one.

I installed my mail script on two different websites (servers) and
found that the results were different as emails sent from the first
work well and the those from the second do not.

Any ideas on why that could be?

Jerry

On Fri, 10 Sep 2004 13:36:38 +0200, "Janwillem Borleffs"
<jw@jwscripts.com> wrote:
Jerry wrote:
My script sends multipart emails using the MAIL_MIME package from
pear.php.net Works great so far but.....

...Sometimes (depending on the mail server that handles the mailing)
all quotation marks in an HTML body of a multipart message become
escaped.

Example:

<form name="form1"> becomes <form name=\"form1\">


http://www.php.net/stripslashes
JW


Jul 17 '05 #3
Jerry wrote:
Any ideas on why that could be?


With the magic_quotes_gpc directive enabled, all Get/Post/Cookie data gets
escaped.

My guess is that somewhere down the line, the email body is submitted.
JW

Jul 17 '05 #4
Hello,

On 09/10/2004 08:29 AM, Jerry wrote:
Hi People !

I have an Urgent Problem and greatly appreciate your help:

My script sends multipart emails using the MAIL_MIME package from
pear.php.net Works great so far but.....

...Sometimes (depending on the mail server that handles the mailing)
all quotation marks in an HTML body of a multipart message become
escaped.

Example:

<form name="form1"> becomes <form name=\"form1\"> That of course cripples all HTML formatted emails. Strange enough:
On some servers the problem does not appear when the transfer-encoding
is "base64" instead of "quoted-printable". On others it does not
matter. I can't see any consistency and don't know how to solve the
problem.

Any ideas?
It seems that you have magic quotes option enabled. Just disable it. If
that does not do it, it is probably a bug in the class you are using.

I do not advise using base64 encoding for HTML messages as it would be
immediately dropped by many spam filters.

..ah...and does anybody know another mail packages similar to
MAIL_MIME in order to implement multipart email functionality in a php
script?


You may want to try this other package as it works perfectly for me:

http://www.phpclasses.org/mimemessage
--

Regards,
Manuel Lemos

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

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #5
Dear Manuel,

Thanks so much for your invaluable info. I greatly appreciate your
excellent package and help. Thank you

Greetings!

On Fri, 10 Sep 2004 15:13:39 -0300, Manuel Lemos <ml****@acm.org>
wrote:
Hello,

On 09/10/2004 08:29 AM, Jerry wrote:
Hi People !

I have an Urgent Problem and greatly appreciate your help:

My script sends multipart emails using the MAIL_MIME package from
pear.php.net Works great so far but.....

...Sometimes (depending on the mail server that handles the mailing)
all quotation marks in an HTML body of a multipart message become
escaped.

Example:

<form name="form1"> becomes <form name=\"form1\">

That of course cripples all HTML formatted emails. Strange enough:
On some servers the problem does not appear when the transfer-encoding
is "base64" instead of "quoted-printable". On others it does not
matter. I can't see any consistency and don't know how to solve the
problem.

Any ideas?


It seems that you have magic quotes option enabled. Just disable it. If
that does not do it, it is probably a bug in the class you are using.

I do not advise using base64 encoding for HTML messages as it would be
immediately dropped by many spam filters.

..ah...and does anybody know another mail packages similar to
MAIL_MIME in order to implement multipart email functionality in a php
script?


You may want to try this other package as it works perfectly for me:

http://www.phpclasses.org/mimemessage


Jul 17 '05 #6
Dear Manuel:

Your mime-mail package works great but I have a small problem and hope
you can help me out on this:

When I send via SMTP I get the following error and don't know what it
actually means:

"Error: reached the end of data while reading from the SMTP server
conection"

Can you help?
Thank you so much.
Greetings

On Fri, 10 Sep 2004 15:13:39 -0300, Manuel Lemos <ml****@acm.org>
wrote:
Hello,

On 09/10/2004 08:29 AM, Jerry wrote:
Hi People !

I have an Urgent Problem and greatly appreciate your help:

My script sends multipart emails using the MAIL_MIME package from
pear.php.net Works great so far but.....

...Sometimes (depending on the mail server that handles the mailing)
all quotation marks in an HTML body of a multipart message become
escaped.

Example:

<form name="form1"> becomes <form name=\"form1\">

That of course cripples all HTML formatted emails. Strange enough:
On some servers the problem does not appear when the transfer-encoding
is "base64" instead of "quoted-printable". On others it does not
matter. I can't see any consistency and don't know how to solve the
problem.

Any ideas?


It seems that you have magic quotes option enabled. Just disable it. If
that does not do it, it is probably a bug in the class you are using.

I do not advise using base64 encoding for HTML messages as it would be
immediately dropped by many spam filters.

..ah...and does anybody know another mail packages similar to
MAIL_MIME in order to implement multipart email functionality in a php
script?


You may want to try this other package as it works perfectly for me:

http://www.phpclasses.org/mimemessage


Jul 17 '05 #7
>Your mime-mail package works great but I have a small problem and hope
you can help me out on this:

When I send via SMTP I get the following error and don't know what it
actually means:

"Error: reached the end of data while reading from the SMTP server
conection"


When you send a piece of mail on a SMTP connection, you are supposed
to send:

DATA\r\n
text of the mail, including headers\r\n
..\r\n

If you hit EOF without sending a period alone on a line, chances are
you either forgot to send the period, or the text of the mail
didn't end with the end of a line.

Gordon L. Burditt
Jul 17 '05 #8
Hello,

On 09/12/2004 08:06 AM, Jerry wrote:
Dear Manuel:

Your mime-mail package works great but I have a small problem and hope
you can help me out on this:

When I send via SMTP I get the following error and don't know what it
actually means:

"Error: reached the end of data while reading from the SMTP server
conection"

Can you help?

This means that there was a timeout or the server disconnected while the
class was expecting some response from the server.

I don't know if you really need to use SMTP, but if you do, just enable
smtp_debug variable to see the SMTP dialog with the server. The reason
of this problem should be explained looking at that dialog.

--

Regards,
Manuel Lemos

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

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #9
Dear Manuel,

Thank you for a great package and your commitment. I have been testing
it today and ran into a problem which I am not sure if it is a bug in
your coding or if it is just me being sufficiently ignorant to see
what I am doing wrong. It would be wonderful if you could just take a
quick look and see yourself whether or not your class works correctly.

The situation:

I am sending different multipart messages via SMTP to a group of
colleages. While running the send script individually (one by one)
everything works fine. In order to make the mailing a bit more
convenient I placed the send-routine in a loop and let it run. The
loop executes exactly the same routine with only the "to_address"
changing.
The strange thing now is that it fails to login into the SMTP server
every second loop. So, the messages are being sent successfully to
recipient 1,3,5,7,.... However, recipient 2,4,6,8,... would not
receive anything. So I ran the script in debug mode and it revealed
that in every second loop the send-routine was failing to login.

I have copied the protocol and marked the relevant lines.
Please see: http://209.197.87.129/smtp/mlemos.htm

Manuel, I very much appreciate your dedication and help and I really
hope to not steal too much of your time. However, I thought you might
be interested in this experience for that it could possibly be a bug
in your package (... well, if it is a bug at all. I beg your pardon
for my ignorance).
Do you have an idea of what the problem could be?

Many Greetings
Jerry Wilkins
On Sun, 12 Sep 2004 14:24:47 -0300, Manuel Lemos <ml****@acm.org>
wrote:
Hello,

On 09/12/2004 08:06 AM, Jerry wrote:
Dear Manuel:

Your mime-mail package works great but I have a small problem and hope
you can help me out on this:

When I send via SMTP I get the following error and don't know what it
actually means:

"Error: reached the end of data while reading from the SMTP server
conection"

Can you help?

This means that there was a timeout or the server disconnected while the
class was expecting some response from the server.

I don't know if you really need to use SMTP, but if you do, just enable
smtp_debug variable to see the SMTP dialog with the server. The reason
of this problem should be explained looking at that dialog.


Jul 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Jack Smash | last post: by
4 posts views Thread by fo | last post: by
5 posts views Thread by Irfan Akram | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.