This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > October 2005 > \n + . = truncated email





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author \n + . = truncated email
Dica

2005-10-30, 6:28 pm

i just got an email from a client about her ezine being truncated on the
last few lines. i built this ezine publishing tool for them a couple of
years ago and this is the first problem we've had with it. i looked at the
function which seemed fine. then i looked at the content. the only thing
that caught my eye is that on the last line before the ezine becomes
truncated, she writes:

For more information, please see http://www.whatever.com
..

if i changed that to:
For more information, please see http://www.whatever.com.

then everything is fine. i've fixed this in my ezine by replacing \n + .
with just .

odd one, eh?


Brian Wakem

2005-10-30, 6:28 pm

Dica wrote:

> i just got an email from a client about her ezine being truncated on the
> last few lines. i built this ezine publishing tool for them a couple of
> years ago and this is the first problem we've had with it. i looked at
> the function which seemed fine. then i looked at the content. the only
> thing that caught my eye is that on the last line before the ezine becomes
> truncated, she writes:
>
> For more information, please see http://www.whatever.com
> .
>
> if i changed that to:
> For more information, please see http://www.whatever.com.
>
> then everything is fine. i've fixed this in my ezine by replacing \n + .
> with just .
>
> odd one, eh?



No. SMTP protocol specifieds a single dot on a its own on a line as the end
of message.



--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
Dica

2005-10-30, 6:28 pm


"Brian Wakem" <no@email.com> wrote in message
news:3sk429FoourqU1@individual.net...
> Dica wrote:
>
becomes[color=darkred]
>
>
> No. SMTP protocol specifieds a single dot on a its own on a line as the

end
> of message.


ah. well, that's not nearly as mysterious, is it?

>
>
>
> --
> Brian Wakem
> Email: http://homepage.ntlworld.com/b.wakem/myemail.png




Alan Little

2005-10-30, 6:28 pm

Carved in mystic runes upon the very living rock, the last words of
Brian Wakem of alt.www.webmaster make plain:

> Dica wrote:
>
>
> No. SMTP protocol specifieds a single dot on a its own on a line as
> the end of message.


Although if the user actually types that, the email client is supposed to
convert it to a double dot, which will then get passed through as a
single.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Benjamin Niemann

2005-10-30, 6:28 pm

Alan Little wrote:

> Carved in mystic runes upon the very living rock, the last words of
> Brian Wakem of alt.www.webmaster make plain:
>
>
> Although if the user actually types that, the email client is supposed to
> convert it to a double dot, which will then get passed through as a
> single.


Yes, but the actual behaviour in the wild seems to be a but more difficult.
Everytime a mail is sent via SMTP (usually multiple time, until it reaches
its recipent), dots must be 'doubled' or 'undoubled'. There seem to be
servers out there that do not implement this correctly. For a
quoted-printable encoded HTML newsletter I ended up with dots sometimes
doubled and sometimes omitted, when the mail reached the recipent (the mail
has <img>s embedded and when the src attribute was wrapped by quopri just
before the dot in 'image.gif', I had 404 entries for 'imagegif' and
'image..gif' in my server log). I solved this by hacking the quopri
function to always quote dots at the start of lines as '=XX'.


--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Benjamin Niemann

2005-10-30, 6:28 pm

Benjamin Niemann wrote:

> Alan Little wrote:
>
>
> Yes, but the actual behaviour in the wild seems to be a but more
> difficult. Everytime a mail is sent via SMTP (usually multiple time, until
> it reaches its recipent), dots must be 'doubled' or 'undoubled'. There
> seem to be servers out there that do not implement this correctly. For a
> quoted-printable encoded HTML newsletter I ended up with dots sometimes
> doubled and sometimes omitted, when the mail reached the recipent (the
> mail has <img>s embedded and when the src attribute was wrapped by quopri
> just before the dot in 'image.gif', I had 404 entries for 'imagegif' and
> 'image..gif' in my server log). I solved this by hacking the quopri
> function to always quote dots at the start of lines as '=XX'.


Sorry, I thought I was on comp.lang.python... So hacking the 'quopri
function' does only apply to the Python email package.

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Alan Little

2005-10-30, 10:17 pm

Carved in mystic runes upon the very living rock, the last words of
Benjamin Niemann of alt.www.webmaster make plain:

> Alan Little wrote:
>
>
> Yes, but the actual behaviour in the wild seems to be a but more
> difficult. Everytime a mail is sent via SMTP (usually multiple time,
> until it reaches its recipent), dots must be 'doubled' or 'undoubled'.
> There seem to be servers out there that do not implement this
> correctly. For a quoted-printable encoded HTML newsletter I ended up
> with dots sometimes doubled and sometimes omitted, when the mail
> reached the recipent (the mail has <img>s embedded and when the src
> attribute was wrapped by quopri just before the dot in 'image.gif', I
> had 404 entries for 'imagegif' and 'image..gif' in my server log). I
> solved this by hacking the quopri function to always quote dots at the
> start of lines as '=XX'.


Hm. The dot at the beginning of the line should only be doubled or un-
doubled if there is nothing but dots on the line. A line with .gif on it
should be untouched either way. Of course, if programs (and programmers
always did what they were supposed to, things would be too easy.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Ken

2005-10-30, 10:17 pm

Hi Alan -

On Sun, 30 Oct 2005 19:50:27 -0600, Alan Little
<alan@n-o-s-p-a-m-phorm.com> wrote:

>Hm. The dot at the beginning of the line should only be doubled or un-
>doubled if there is nothing but dots on the line. A line with .gif on it
>should be untouched either way. Of course, if programs (and programmers
>always did what they were supposed to, things would be too easy.


It doesn't matter what else is on the line, if the first character is
period it is to be doubled. See rfc 2821 4.5.2.

http://www.rfc-editor.org/rfc/rfc2821.txt

--
Ken
http://www.ke9nr.net/
Alan Little

2005-10-31, 6:44 pm

Carved in mystic runes upon the very living rock, the last words of Ken
of alt.www.webmaster make plain:

> Hi Alan -
>
> On Sun, 30 Oct 2005 19:50:27 -0600, Alan Little
> <alan@n-o-s-p-a-m-phorm.com> wrote:
>
>
> It doesn't matter what else is on the line, if the first character is
> period it is to be doubled. See rfc 2821 4.5.2.
>
> http://www.rfc-editor.org/rfc/rfc2821.txt


You're right. I should have double-checked, but thought I'd trust my
memory. I should know better :)

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Ken

2005-10-31, 6:44 pm

Hi Alan -

On Mon, 31 Oct 2005 05:34:31 -0600, Alan Little
<alan@n-o-s-p-a-m-phorm.com> wrote:

>Carved in mystic runes upon the very living rock, the last words of Ken
>of alt.www.webmaster make plain:
>
>
>You're right. I should have double-checked, but thought I'd trust my
>memory. I should know better :)


I wouldn't know except that I recently wrote a small email client for
an IBM iSeries system to read email from a file and relay it to a
smart host with SMTP, so I had to research that issue.

--
Ken
http://www.ke9nr.net/
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews