Solved

Mailer keeps defaulting to 7bit encoding

Posted on 2002-07-11
24
263 Views
Last Modified: 2006-11-17
Hello -

I'm using a html MIME mailer featured at hotscripts. The problem is, when sending the text/html via SMTP, it's defaulting to 7bit encoding which is expressly not recommended. The script comes set with var $Encoding  = "8bit" which I've tried changing but it keeps resetting itself to 7bit. It needs to be set so the text/html is sent with the encoding "quoted-printable".

I've tried contacting the author with no luck.

The script is here:  http://geocities.com/zoobie007/formailer.txt

Thank you
0
Comment
Question by:zoobie
  • 11
  • 10
  • 3
24 Comments
 
LVL 40

Expert Comment

by:RQuadling
ID: 7149146
There is a line in the class ...

        //echo "<pre>".$header . $body . "</pre>"; // debugging


If you remove the "//" at the front, you will see EXACTLY what the header that you have created contains.

Does this contain the wrong encoding type?

0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7149150
Try ...

http://phpmailer.sourceforge.net/

for a later version maybe.
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7149167
That looks like a nice and simple class!

0
 
LVL 1

Author Comment

by:zoobie
ID: 7149861
Umm...The sourceforge link is the same mailer...It's filled with bugs, obviously and anything but simple.
0
 
LVL 1

Author Comment

by:zoobie
ID: 7152016
Sorry...I don't see the  //echo "<pre>".$header . $body . "</pre>"; // debugging line...

Not that it would help...

Let me ask you this...Could the server be screwing up the mailer and using it's own encoding? The author sent me back a snippet $mail->Encoding = "quoted-printable"; which really screwed up things so I dropped it.

Thanks
0
 
LVL 1

Author Comment

by:zoobie
ID: 7152018
Sorry...I don't see the  //echo "<pre>".$header . $body . "</pre>"; // debugging line...

Not that it would help...

Let me ask you this...Could the server be screwing up the mailer and using it's own encoding? The author sent me back a snippet $mail->Encoding = "quoted-printable"; which really screwed up things so I dropped it.

Thanks
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7152938
On line 441, change ...

        //echo "<pre>".$header . $body . "</pre>"; // debugging


to ...

        echo "<pre>".$header . $body . "</pre>"; // debugging


This will let you see what is being sent from the script.

I would not expect the mailer to alter the encoding.

0
 
LVL 1

Author Comment

by:zoobie
ID: 7153121
Well, the echo doesn't say anything for the encoding for the text/plain and the text/html probably because it's being sent 7bit.

The source code in my OE says it's still 7bit because I haven't changed anything.

The "author" just took this from a ASP site and changed it into PHP. He's also completely lost and doesn't know it's not displaying in major web/client accounts. Quote: "I just assumed..."

One last time...Is it possible that my email server is changing the encoding to 7bit? If so, what's a good free email SMTP to use that won't?

Thanks
0
 
LVL 1

Author Comment

by:zoobie
ID: 7153199
Well, the echo doesn't say anything for the encoding for the text/plain and the text/html probably because it's being sent 7bit.

The source code in my OE says it's still 7bit because I haven't changed anything.

The "author" just took this from a ASP site and changed it into PHP. He's also completely lost and doesn't know it's not displaying in major web/client accounts. Quote: "I just assumed..."

One last time...Is it possible that my email server is changing the encoding to 7bit? If so, what's a good free email SMTP to use that won't?

Thanks
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7155723
A request for deletion has been made.  If no response or you feel this is in error, comment.  If no objection, I will delete in three days.

Computer101
E-E Moderator
0
 
LVL 1

Author Comment

by:zoobie
ID: 7155801
3 days? I need it deleted now...bummer
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7156730
As you are sending plain text, you can only use 7bit encoding. Your attachments would be encoded differently.

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 40

Expert Comment

by:RQuadling
ID: 7156731
What is the exact problem you are having?
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7156744
If the headers do not show any encoding settings, then I would assume that plain text 7bit would be used as a default.
0
 
LVL 1

Author Comment

by:zoobie
ID: 7157678
Umm...Look up to see problem.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7158281
RQ,
Any objection to delete this question?

Computer101
E-E Moderator
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7159094
Not really, as I can't see what is wrong with sending plain text as 7bit. 8bit is only really needed for binary files.

It is possible that if the mail is being routed through different servers it COULD be translated (shouldn't happen, but the store and forward methods of ancient old would have to convert from one "protocol" to another as it moved from one system to the next).

0
 
LVL 1

Author Comment

by:zoobie
ID: 7161183
Quote from post #1:

"The script comes set with var $Encoding  = "8bit" which I've tried changing but it keeps resetting itself to 7bit. It needs to be set so the text/html is sent with the encoding "quoted-printable"."

Delete it
0
 
LVL 1

Author Comment

by:zoobie
ID: 7161190
Thanks anyway...
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7161601
But you say that the headers being sent do NOT contain any encoding paramaters, so the default would probably be 7bit (historically), so the scrpit is probably broken and not the servers.

There are other HTML email classes available.

Try sourceforge.net or hotscripts.com.

Regards,

Richard Quadling.
0
 
LVL 1

Author Comment

by:zoobie
ID: 7162898
Yep...the scripts screwed up. I'm now asking a q about passing variables into the html.mime.mail featured @ hotscripts.

This q still needs to be deleted.
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 7163096
Hopefully I've answered your new question.

What I don't understand about this one is ...

7bit or 8bit so what! Are you actually having errors in your email? i.e. you've attached an image and it is coming out junk or what?

Just because your mail reader program says 7bit, doesn't mean it knows what is going on. It may have determined only text, make it 7 bit. Does it matter?

What actually end result error are you having?
0
 
LVL 1

Author Comment

by:zoobie
ID: 7166391
The script has been confirmed broken at 2 other forums...so, I'm deleting this thread.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 7166640
Points refunded and placed in PAQ

Computer101
E-E Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Echo vs ?><?php  html code 4 47
myqsl update statement on phpMyAdmin 8 22
updating the date data 12 25
Could you point how to give Bootstrap's open/ close menu effect ? 25 39
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now