Hello

 

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.

 

 

Harvey

 

 

#####################################################################

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()

#####################################################################

Output ----

 

Content-Type: text/plain; charset="us-ascii"

MIME-Version: 1.0

Content-Transfer-Encoding: 7bit

Subject: "Information from ost-cs-emma"

From: [EMAIL PROTECTED]

To: [EMAIL PROTECTED]

 

Some text

Some more text in body

 

 




-----------------------------------------
Information in this email including any attachments may be
privileged, confidential and is intended exclusively for the
addressee. The views expressed may not be official policy, but the
personal views of the originator. If you have received it in error,
please notify the sender by return e-mail and delete it from your
system. You should not reproduce, distribute, store, retransmit,
use or disclose its contents to anyone.

Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.

SKY and the SKY marks are trade marks of British Sky Broadcasting
Group plc and are used under licence. British Sky Broadcasting
Limited (Registration No. 2906991), Sky Interactive Limited
(Registration No. 3554332), Sky-In-Home Service Limited
(Registration No. 2067075) and Sky Subscribers Services Limited
(Registration No. 2340150) are direct or indirect subsidiaries of
British Sky Broadcasting Group plc (Registration No. 2247735). All
of the companies mentioned in this paragraph are incorporated in
England and Wales and share the same registered office at Grant
Way, Isleworth, Middlesex TW7 5QD.      
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to