473,657 Members | 2,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2279
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.c om> 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_gp c 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
1720
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 folder. Can someone tell me what type of content I should put in the email to get around the filter? All my content is so far is a thanks for registering message - and a link for them to confirm their email address.
4
2128
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: PHP/" . phpversion()); Many thanks FO -------------- blah blah ...
11
2913
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 when trying to call my test.php file is a 404 error? http.config file: LoadModule php5_module "C:/php/php5apache2.dll" PHPIniDir "C:/php" AddType application/x-httpd-php .php
5
1422
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: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---
0
3047
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
3518
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 (empty) the form on (release) { _parent.getURL("contact.php","_blank", "GET"); _parent.name=""; _parent.phone="";
3
1955
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 text box value is not echoed to my result page 2# also the mail doesn't send me the text box value 3# the address bar view that the value entered was the correct value i entered so please help me the 111.htm form code is:
8
6727
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 and working. i have used the following code. I am getting the error.. CDO.Message.1 (0x80040213) The transport failed to connect to the server. the error is throwing at '.Send' line. the actual mail IDs given in from and to are real and...
2
2995
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 code for a contact form and i would like to add a simple Html thank you page when user submits the form. Here is the code; <?php if(isset($_POST)) { $to = "email@e-mail.com"; $subject = "Test Message";
0
8394
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.