473,425 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

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 2273
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jack Smash | last post by:
I am having lots of trouble with the mail function! I simply send a confirmation email to someone who has registered on my site - but thte message usually gets filtered or sent to the bulk mail...
4
by: fo | last post by:
Hi I want to add one other emailrecepient to my mail code and can't seem to get it wright. Could you please help. Here is the code is this lien correct <emerge@goldcoastrentals.com.au>\nX-Mailer:...
11
by: gregsands | last post by:
Hi Im trying to install PHP 5.05 on Windows XP running Apache 2.0.54 Apache is running fine and ive made all the changes to the pnp.ini file and Apache config file, restarted Apache but all I get...
5
by: Irfan Akram | last post by:
Hi People, I am tryint to use the facilities of System.Web.Mail in order to implement an email sending facility in my web-based application. I get this error. An error occurred:...
0
by: 2Barter.net | last post by:
newsmail@reuters.uk.ed10.net Fwd: Money for New Orleans, AL & GA Inbox Reply Reply to all Forward Print Add 2Barter.net to Contacts list Delete this message Report phishing Show original
6
by: Derek | last post by:
Hi all any one please help, i have a buttin in flash 8 which gets a form contact.php but when it is pressed the emial ruturns empty as follows 1 the flash button 2 the form 3 the email outcome...
3
by: shror | last post by:
I was testing to post a form and echo message according to the submitted box using else if and then mail() the box result to myself just for testing the procedure but i got some problems: 1# the...
8
by: kpdeepu | last post by:
Hi all, I am a complete newbie to ASP and am trying to send email from my gmail account to another gmail ID. Is it possible? I have my computer with no mail server installed. i have IIS installed...
2
by: Ecot | last post by:
Hi all, I have not got any php knowledge and I have found a php code on the net and using it to send e-mail from a web html form.So far the form and the code works fine. I have the following php...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.