Re: gen_smtp: be notified on failed delivery message

Frank Muller <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAFA6GnDep6XZf=XwKOSRiOhtj-_qMdgrDQsAcj_gyWJPSn_1fA@mail.gmail.com>
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 <[email protected]> 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 <[email protected]> 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
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.