By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,089 Members | 2,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,089 IT Pros & Developers. It's quick & easy.

reg email packages work

P: n/a
Dear All,

I am working in web based email system project.
Here I try to build email message
from scratch. I used below code to build email
message

msg = email.MIMEBase('text','html')
msg['Return-Path'] = user+'@'+domain
msg['Date'] = formatdate(localtime=1)
msg['Subject'] = subject
msg['From'] = from_name
msg['To'] = to
msg['Cc'] = cc
msg.set_payload("Body of the email messagge")
fh = os.popen('/bin/sendmail %s'% (eachid),'w')
fh.write(msg.as_string())
fh.close()

This code will build plain email message properly.
But after building the message. If a email user
download this mail through out look express then
this email message will display without any alignment.
If a user type 3 paragraph message
outlook express display as a single line. What
could be problem?. Kindly let me know ASAP

regards
Prabahar

__________________________________________________ ________
How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo! Photos http://in.photos.yahoo.com
Aug 29 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
praba kar <pr*********@yahoo.co.in> wrote:

I am working in web based email system project.
Here I try to build email message
from scratch. I used below code to build email
message

msg = email.MIMEBase('text','html')
msg['Return-Path'] = user+'@'+domain
msg['Date'] = formatdate(localtime=1)
msg['Subject'] = subject
msg['From'] = from_name
msg['To'] = to
msg['Cc'] = cc
msg.set_payload("Body of the email messagge")
fh = os.popen('/bin/sendmail %s'% (eachid),'w')
fh.write(msg.as_string())
fh.close()

This code will build plain email message properly.


No, it doesn't. It builds an HTML message (see the very first line). If
you supply plain text to this as the body of the message, all the lines
will be concatenated together, which sounds a lot like what you are seeing.

If you are not feeding HTML as the body, change the fist line to
('text','plain').
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Sep 2 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.