Menu

#72 Removing dots in beginning of line

open
nobody
None
5
2005-10-21
2005-10-21
Anonymous
No

Hi,
when i try to send a html formatted mail that has a style
part in it OpenSmtp removes the dots in front of the
style classes
Unfortunattely it makes the pages look bad. A
workaround is to have a comment before the class
i.e /*Class OpenSMTP*/.opensmtp{font:bold;}

But it would be better if I could remove it.....

Regards
JPalmer

Discussion

  • Nando Florestan

    Nando Florestan - 2005-10-22

    Logged In: YES
    user_id=821202

    EVERY dot (that would appear at the end or at the beginning
    of a quoted-printable encoded HTML message) is removed --
    not just CSS styles. So this bug is more serious than you
    thought.

    I have written a test for anyone who wants to reproduce the
    bug. I would have liked to attach it as a file, but it seems
    that I can't. SIGH. OK, you can download it at:

    http://oui.com.br/n/OpenSmtpBug.zip

     
  • Mike Peschka

    Mike Peschka - 2006-01-12

    Logged In: YES
    user_id=858635

    It seems that the ConvertToQP method in MailEncoder.cs is
    not correctly handling section 4.5.2 of RFC 2821, which
    discussing escaping any lines that begin with a period. I
    have patched the file to correct this, but since I cannot
    upload it via SF, I have posted it on my site...
    http://www.atomicmike.com/MailEncoder.cs.txt

    The file may need patches elsewhere, but that at least
    fixes the problems with sending.

     
  • Nobody/Anonymous

    Logged In: NO

    I modified the ConvertToQP method (see previous post)
    because empty line gave me a index out of range exception,
    here is the fragment:

    if (bNewline)
    {
    // Added 12-Jan-2006 mike@atomicmike.com
    // RFC 2821, 4.5.2; Lines beginning with a period must be
    escaped.
    if (currLine.Length > 0 && currLine[0] == '.')
    {
    currLine.Insert(0, '.');
    }
    // RFC 822 linebreak = CRLF
    sb.Append(currLine.ToString() + "\r\n");
    currLine = new StringBuilder();
    bNewline = false;
    }

     

Log in to post a comment.