473,394 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Email problem

Ok, I'm putting my email message together this way:
for x in M.retr(i)[1]:
stringMail += x
stringMail += '\n'
inMail = email.message_from_string(stringMail)
What I'm finding is in the html part of the message '='s are added to the end
of lines that don't end in a tag which is completely messing up the display in
my WxHTMLWindow I use to display messages. Any thoughts?
Jul 18 '05 #1
2 1048
> Ok, I'm putting my email message together this way:
for x in M.retr(i)[1]:
stringMail += x
stringMail += '\n'
inMail = email.message_from_string(stringMail)
What I'm finding is in the html part of the message '='s are added to the end
of lines that don't end in a tag which is completely messing up the display in
my WxHTMLWindow I use to display messages. Any thoughts?


One thing you should always do when creating email is making sure that
lines end with a CRLF pair. Lines that only end with one or the other
but not both are not RFC 2822 compliant. It may be the case that the '='
are added to lines that are ended improperly.

To fit in with what you are doing above:
stringMail += x.rstrip() + '\r\n'

Though I would suggest against the generally slow repeated string
concatenation (for large numbers of concatenations), replacing it with:
mail = []
for x in M.retr(i)[1]:
mail.append(x.rstrip())
inMail = email.message_from_string('\r\n'.join(mail))

Try that out and see how it works.

- Josiah

Jul 18 '05 #2
Thanks for the advice, that is a much more efficient way of getting the message
together. It didn't help though. I probably should add that the problem with
the '='s added in has occured so far in my limited testing with AOL and
ubi.com, other's have not had that problem.
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jpastora | last post by:
I'm having a strange problem with our email links on the domain : http://www.pc350.com/ . The problem is that when you click on an email link, the email app is not launched until the browser...
6
by: mike | last post by:
I have created a side application in VB.NET which reads rows from a DB and builds an email message. when i have a long string the the mailmessage.body or the mailmessage, it puts in an...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
0
by: VP | last post by:
g'day, i am posting a problem i have encountered with creating an email using outlook through some basic c# code. the problem arises when using different email editors in outlook. At the moment...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
26
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
0
by: RickVidallon | last post by:
Missing or Truncated Body Text in Email Application - 2 Strange Examples... There is no earthly reason why this is happening! EXAMPLES HERE: http://65.36.227.70/actmailer/ We have a...
3
by: Steven Allport | last post by:
I am working on processing eml email message using the email module (python 2.5), on files exported from an Outlook PST file, to extract the composite parts of the email. In most instances this...
3
by: IGD | last post by:
I don't know if this is the right place to post this or not. If not, could someone direct me elsewhere where I would find more information on how to solve my problem? Thanks! My problem is this:...
28
tdw
by: tdw | last post by:
Hi all, I am trying to add a feature to our database that automates sending emails. When entering a new order, I want the option to send an email to the company the order came from, attaching a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.