Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58910
| From | dieter <dieter@handshake.de> |
|---|---|
| Subject | Re: When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ??? |
| Date | 2013-11-09 08:29 +0100 |
| References | <aa3a285b-b526-4f02-9cfa-90ef4e3daf3a@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2281.1383982152.18130.python-list@python.org> (permalink) |
richard.balbat@gmail.com writes:
> I have the following script that reads in an HTML file containing a table then sends it out via email with a content type of text/html.
>
> For some reason a few erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ???
> ...
> Contents of results.html
>
> <html><head><title>Test Campaign Results</title></head><body><p>SoapUI regression testing has completed against the following: <br/><br/> Environment: Auto.QA<br/>Build: test<br/>Detailed results can be found here: http://xxxx-AUTO1.xxxx.xxx/SoapUITestResults/Auto.QA-2013-6-11_22-54-50<br/><br/></p><table border="1"><tr><th>SoapUI Project (WSDL/WADL)</th><th>Total</th><th>Pass</th><th>Failure</th><th>Pass Percentage</th></tr><tr><td>acceptancePartnerEndpointWSDefinition-soapui-project.xml</td><td>7</td><td><font color="green">7</font></td><td><font color="red">0</font></td><td>100.00%</td></tr><tr><td>AIM-Automation.xml</td><td>25</td><td><font color="green">23</font></td><td><font color="red">2</font></td><td>92.00%</td></tr><tr><td>ATM-Automation.xml</td><td>41</td><td><font color="green
> ...
I suggest to log the generated email (before sending) to verify whether
the transformation happens in your script or somewhere during the
email transport.
The email transport protocol ("SMTP" - "Simple Mail Transfer Protocol")
in principle imposes quite a strict limitation on line length
(72 characters, when I remember right). Your html input has much larger
lines - maybe, they are broken up somewhere - at the cost of spurious
whitespace. Usually, a "Content-Transfer-Encoding" is used
to satisfy the line length limitation. If this is quoted printable,
then reading the text undecoded, it may seem to have additional
characters (whitespace and control characters).
I have no idea what may replace "<" and ">" by html entity references.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ??? richard.balbat@gmail.com - 2013-11-08 14:06 -0800
Re: When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ??? dieter <dieter@handshake.de> - 2013-11-09 08:29 +0100
Re: When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ??? Richard Balbat <richard.balbat@gmail.com> - 2013-11-11 18:02 -0800
Re: When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ??? Walter Hurry <walterhurry@lavabit.com> - 2013-11-10 04:17 +0000
csiph-web