Skip to content

Instantly share code, notes, and snippets.

@craue
Created November 24, 2011 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craue/1391209 to your computer and use it in GitHub Desktop.
Save craue/1391209 to your computer and use it in GitHub Desktop.
body for an email which will be stripped when sent with SwiftMailer
Mail will be stripped due to the length of THIS line and the dot.
Apparently, this line will not be sent due to the exact length of the previous line, the trailing dot and two newlines, no matter which kind of newlines (Windows/UNIX) will be used.
@mvrhov
Copy link

mvrhov commented Nov 24, 2011

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Mail will be stripped due to the length of THIS line and the dot=
.

Apparently, this line will not be sent due to the exact lengt=
h of the previous line, the trailing dot and two newlines, no matter whi=
ch kind of newlines (Windows/UNIX) will be used.

@mvrhov
Copy link

mvrhov commented Nov 24, 2011

there might indeed be a problem in swiftmailer as the . is in new line and is followed by \r\n\r\n

@craue
Copy link
Author

craue commented Nov 24, 2011

This is what I get:

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Mail will be stripped due to the length of THIS line and the dot=

@mvrhov
Copy link

mvrhov commented Nov 24, 2011

    0x0050:  746f 2074 6865 206c 656e 6774 6820 6f66  to.the.length.of
    0x0060:  2054 4849 5320 6c69 6e65 2061 6e64 2074  .THIS.line.and.t
    0x0070:  6865 2064 6f74 3d0d 0a2e 2e0d 0a0d 0a41  he.dot=........A
    0x0080:  7070 6172 656e 746c 792c 2074 6869 7320  pparently,.this.

I've used following command: -i lo means use localhost interface..
tcpdump -nnvvXSs 1514 -i lo port 25

@craue
Copy link
Author

craue commented Nov 24, 2011

This one (using a different MTA) is correct:

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Mail will be stripped due to the length of THIS line and the dot=
..

Apparently, this line will be cut off due to the exact length=
 of the previous line, the trailing dot, and two newlines.

in detail:

61 6E 64 20 74 68 65 20 64 6F 74   and the dot
3D 0D 0A 2E 2E 0D 0A 0D 0A         =........
41 70 70 61 72 65 6E 74 6C 79      Apparently

@craue
Copy link
Author

craue commented Nov 24, 2011

Failing case:

0x0070:                           743d 0d0a 2e0d            t=....
0x0080:  0a0d 0a41 616d 656e 737a 7573 6174 7a20  ...A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment