Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This has been driving me absolutely crazy for a few days now. I have an e-mail. If I send it from a Windows Server 2003 server via MailEnable, a certain person receives it using Outlook 2003 just fine. If, however, I send the exact same message from an Ubuntu 10 server using SSMTP to relay the e-mail to the exact same MailEnable queue, the recipient receives a messed-up-looking e-mail. There are all kinds of "= " all over the place. The exact same e-mail looks fine on my Ubuntu computer, as well as my Mac, and all of the Windows/Mac computers here at work. Here is an excerpt from the copy they receive:

COMPANY has been communicating with COMPANY as they Agency worked to develop the= COMPANY permit, knowing that this would impact aquatic pesticide applicat= ion. But in December, COMPANY advised us that the COMPANY permit would = also cover any pesticide applications made "on or near any water or water c= onveyance." They described a scenario in which a pesticide applicatio= n made in a field or pasture that had a waterway or ditch in it (even if th= e waterway or ditch was dry) would need a COMPANY permit. This meant th= at the majority of pesticide applications made to crops would need a COMPANY = permit, and would have to comply with all the burdensome paperwork requirem= ents plus all of the pesticide application records would be available to th= e public for review.

What on Earth is happening? I'm using PHP's Mail_Mime to send the mail, if that matters.

I have tried testing this on an in-house netbook, running XP and Outlook 2003, same as them, and it looks fine. Unfortunately though, it's happening for more than one person, with different companies, in different states. Is it maybe an Outlook thing? Or a firewall?

UPDATE: Here are the headers they sent me, when I requested them earlier:

Return-Path: <EMAIL@SITE.com>
Received: from SITE (SITE.com [IP])
by SITE.com (SMTP Server) with ESMTP id ID
for <EMAIL@SITE.com>; Fri, 18 Feb 2011 16:38:05 -0500 (EST)
X-Virus-Scanned: OK
X-MessageSniffer-Scan-Result: 0
X-MessageSniffer-Rules: 0-0-0-10711-c
X-CMAE-Scan-Result: 0
X-CNFS-Analysis: v=1.0 c=1 a=fpbBW95AU7UA:10 a=V-86MDL6o3cA:10 a=2Mw0Nu_bH78A:10 a=8nJEP1OIZ-IA:10 a=3kJrlQ3aEg89S9maSudBQQ==:17 a=Ww5RAa15AAAA:8 a=JX_BoxCjAAAA:8 a=JcDirsyPbdX-XEqaAUgA:9 a=ngHfobyUGqXcY9kSWnIA:7 a=05uKYfN37foODCkO7ME1CkFJn8MA:4 a=wPNLvfGTeEIA:10 a=gArCrrCDqOYA:10 a=ePQ_FuT6AdwA:10 a=73nFPGVr2tkA:10
Received: from [IP] ([IP:PORT] helo=GATE)
by SITE.com (envelope-from <EMAIL@SITE.com>)
(ecelerity 2.2.3.46 r(37554)) with ESMTPS (cipher=AES256-SHA) 
id ID; Fri, 18 Feb 2011 16:38:05 -0500
X-Spam-Threshold: 95
X-Spam-Score: 0
X-Spam-Flag: NO
X-Virus-Scanned: OK
X-MessageSniffer-Scan-Result: 0
X-MessageSniffer-Rules: 0-0-0-9968-c
X-CMAE-Scan-Result: 0
X-CNFS-Analysis: v=1.0 c=1 a=V-86MDL6o3cA:10 a=2Mw0Nu_bH78A:10 a=8nJEP1OIZ-IA:10 a=JT1tiycblF0oPc1pVibdeg==:17 a=Ww5RAa15AAAA:8 a=JX_BoxCjAAAA:8 a=JcDirsyPbdX-XEqaAUgA:9 a=ngHfobyUGqXcY9kSWnIA:7 a=05uKYfN37foODCkO7ME1CkFJn8MA:4 a=wPNLvfGTeEIA:10 a=gArCrrCDqOYA:10 a=ePQ_FuT6AdwA:10 a=73nFPGVr2tkA:10
X-Orig-To: EMAIL@SITE.com
X-Originating-Ip: [IP]
Received: from [IP] ([IP:PORT] helo=SITE.com)
by SITE.com (envelope-from <EMAIL@SITE.com>)
(ecelerity 2.2.3.46 r(37554)) with ESMTP
id ID; Fri, 18 Feb 2011 16:33:03 -0500
Received: from mailserver ([IP]) by SITE.com with MailEnable ESMTP; Fri, 18 Feb 2011 15:32:59 -0600
Message-ID: <ID@SITE.com>
Received: by mailserver (sSMTP sendmail emulation); Fri, 18 Feb 2011 15:31:55 -0600
Date: Fri, 18 Feb 2011 15:31:55 -0600
To: EMAIL@SITE.com
Subject: SUBJECT
X-PHP-Originating-Script: 1000:mail.php
MIME-Version: 1.0
From: PERSON <EMAIL@SITE.com>
Reply-To: PERSON <EMAIL@SITE.com>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="ISO-8859-1"
share|improve this question
    
MIME decoding is getting messed up. The ='s are the left overs. Ask them to save both the emails as .eml files then compare the content-type for each part and also see what's the difference in the mail body. If you post that info that would be most useful for debugging your problem. –  PrashantGupta Mar 12 '11 at 2:20
    
@Prashant: I Googled, so I could learn see how to tell them to save them as .eml, and it says that Outlook 2003 doesn't support this, only Express 2003 does. Thoughts? –  Josh Mar 15 '11 at 13:10

2 Answers 2

up vote 1 down vote accepted

I never figured out what the issue was, but by having PEAR use base64 encoding, things seem to be just fine now.

Thanks all.

share|improve this answer

Probably should be a comment, but it is too long.

Glad, you have it sorted, but if you wondering why it happened read on for one possibility.

Your headers say that the emails are being sent 'quoted-printable'. This format is supposed to be one of the methods of ensuring that emails are sent correctly even when they pass through old mail servers which assume that each line will not be more than 76 characters. To do this, it will insert its own carriage returns whenever it thinks it is needed and wherever it does this, it adds the equals sign. What is supposed to happen at the other end is that the email client sees that the email is quoted-printable and removes the equal sign and the extra carriage return.

It is possible that the PHP routines are not quite correct with their encoding which can be confusing something somewhere along the way which is translating the email differently from your server/client.

As you have found out, using a different method of encoding avoids the problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.