SMTP mail receiver from scratch -

 Why?

> felt like i lost my curiosity

> less free time / number of pigeons to take care of

> wanted to build something new

 

Objective

>  A program which can receive email

 

What i don't want

- validation code

- multiple threads

- authentication stuff

 

How does it work:

- client connects to server and sends a command

- each command gets acknowledged by server with a success code

- if something raises error, then the connection gets dropped.

 

Source:

https://github.com/naveen17797/simple-smtp-receiver/releases/tag/init (LLM Generated code)

 

Stuff i found interesting:

> The SMTP server uses . (dot) as a signal to stop receiving DATA part of the email

> So if i manage to put a dot in a newline on email body, this will probably strip the email up to that part.

> How does SMTP prevents that from happening?

> When you send a dot on new line in the email, SMTP client automatically adds a dot and server removes them upon receiving it.

 

 

Share:

0 comments:

Post a Comment