gen_smtp: be notified on failed delivery message
Frank Muller
frank.muller.erl@REDACTED
Wed Jan 13 19:30:47 CET 2021
Thanks for the pointers Marc.
Do I need to implement the server part to check for errors? Can’t the
gen_smtp “client” be notified in case of misspelled address (or unresolved
domain, MX, etc.)?
/Frank
Wed. 13 jan 2021 10:25, Marc Worrell <marc@REDACTED> wrote :
> Hi Frank,
>
> Yes, gen_smtp can report failures that happen during communication with
> the remote smtp server.
> Will also report failures if it can’t resolve the domain or find a MX
> server.
>
> Late bounces (sent by the remote mail agent) must be handled by your own
> code.
>
> In Zotonic we have an example of handling such bounces.
>
> Check for our mail sending code (which also uses mnesia for queueing):
>
>
> https://github.com/zotonic/zotonic/blob/master/apps/zotonic_core/src/smtp/z_email_server.erl
>
> And for receiving email, including parsing and handling of bounce messages:
>
> https://github.com/zotonic/zotonic/tree/master/apps/zotonic_listen_smtp/src
>
> Cheers,
>
> Marc
>
>
> On 13 Jan 2021, at 09:18, Frank Muller <frank.muller.erl@REDACTED> wrote:
>
> Hi everyone
>
> I’m considering using gen_smtp (https://github.com/gen-smtp/gen_smtp) in
> one of my apps.
>
> Question: is there a way to be notified on failed delivery message if for
> example the destination email address was misspelled?
>
> Thanks
> /Frank
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210113/88b9ac4b/attachment.htm>
More information about the erlang-questions
mailing list