Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can we send dot in smtp protocol

If we want when using the SMTP protocol, inside the text a

\n

.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

\n

What should we do so that it is not confused with the endpoint of the email in the SMTP protocol?

>Solution :

Here’s a helpful link to the RFC (top of page 37 if the link isn’t working). Here’s the important takeaway:

The custom of accepting lines ending only in <LF>, as a concession to
non-conforming behavior on the part of some UNIX systems, has proven
to cause more interoperability problems than it solves, and SMTP
server systems MUST NOT do this, even in the name of improved
robustness.  In particular, the sequence "<LF>.<LF>" (bare line
feeds, without carriage returns) MUST NOT be treated as equivalent to
<CRLF>.<CRLF> as the end of mail data indication.

Basically SMTP servers are not actually listening for \n.\n as the terminator. Instead they’re expecting \r\n.\r\n.

The \n character is a newline (in the RFC it’s called LF) whereas the \r\n characters constitute a carriage return (in the RFC it’s called CRLF).

So, it’s an important distinction that SMTP servers actually terminate data with <CRLF>.<CRLF> not <LF>.<LF>, otherwise SMTP servers would run into exactly the issue you bring up here.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading