+
Skip to content

Conversation

srivathsanmurali
Copy link

This PR implements the Mailroom.SMTP.send function that can take a %Mail.Message{} as an argument. The map is used to send all the required commands to the Mail Submission Agent.

The responses from the MSA are verfied to make sure that there are no errors. When an error response is caught, the session is closed and the EMail is not successfully sent. The send function exits with an error tuple.

When Email is sent successfully, send exits with a :ok.
The same error handling is made for send_message function too.

PS. I have also implemented the escaping of the a period(.) at start of line according to rfc5321 4.5.2. I can make a seperate PR for this if that is necessary. This can be found in ce90849.

Srivathsan Murali added 6 commits July 4, 2019 13:02
This function accepts a %Mail.Message{} as an argument,
the data is used to send message to all recipients
as described in the map.

The :mail package is used to build the email message.
The current implementation handles error messages by not completing
the SMTP transaction. At any point, if the response from the server
is an error, the SMTP session is closed.
This is based on RFC5321 4.5.2
@srivathsanmurali
Copy link
Author

@andrewtimberlake Hi, can you review this PR when you some time.
This could be really useful at work. Would be happy to modify it to better work for this project.
Thanks

@andrewtimberlake andrewtimberlake force-pushed the master branch 2 times, most recently from 5f46609 to 7b602a7 Compare December 7, 2021 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载