[Email-SIG] Certain charaters in the body stop mail from arriving. Why?
Mark Sapiro
mark at msapiro.net
Thu Nov 29 16:46:15 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
West, Harvey wrote:
>
> Sending mail with certain characters in the body causes mail never to
> arrive. Why?
> e.g if body text has a fullstop "." mail never arrives.
>
> I'm using python 4.2 on windows.
WFM - Python 2.4.2 - Windows XP
mailit.py--------------------------------------------------------------
import smtplib
from email.MIMEText import MIMEText
def mail(serverURL=None, sender='', to='', subject='', text=''):
COMMASPACE = ', '
to = COMMASPACE.join(to)
msg = MIMEText(text)
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = to
mailServer = smtplib.SMTP(serverURL, 25)
mailServer.sendmail(sender, to, msg.as_string())
mailServer.quit()
print msg.as_string()
sender = 'msapiro at msapiro.net'
to = ['msapiro at value.net']
subject = 'Test Message'
text = """This is the message body.
It contains full stop.
And other punctuation,/'- and some more text.
"""
server = 'localhost'
mail(server, sender, to, subject, text)
- ----------------------------------------------------------------------
Test------------------------------------------------------------------
C:\Documents and Settings\Owner\Desktop>python mailit.py
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Test Message
From: msapiro at msapiro.net
To: msapiro at value.net
This is the message body.
It contains full stop.
And other punctuation,/'- and some more text.
C:\Documents and Settings\Owner\Desktop>
- ------------------------------------------------------------------------
Received mail-----------------------------------------------------------
<some Received: headers snipped>
Received: from localhost ([127.0.0.1] helo=[192.168.0.4])
by msapiro.net with esmtp (Exim 4.62)
(envelope-from <msapiro at msapiro.net>)
id JS9XHD-0001A4-MX
for msapiro at value.net; Thu, 29 Nov 2007 07:24:49 -0800
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Test Message
From: msapiro at msapiro.net
To: msapiro at value.net
<X-pstn-* Postini headers snipped>
Message-Id: <20071129082455.SM02600 at psmtp.com>
Date: Thu, 29 Nov 2007 08:24:51 -0700
X-GPC-MailScanner: Found to be clean
X-GPC-MailScanner-From: msapiro at msapiro.net
X-Spam-Status: No
This is the message body.
It contains full stop.
And other punctuation,/'- and some more text.
- ------------------------------------------------------------------------
- --
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFHTt7HVVuXXpU7hpMRAgNXAJ44SAQmMm3usiPbI7+cvMrkrZDgoACg+E3D
8NQ8cLkVDsx9dPiSdp81rf4=
=ThwX
-----END PGP SIGNATURE-----
More information about the Email-SIG
mailing list