<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Frank,<div class=""><br class=""></div><div class="">Yes, gen_smtp can report failures that happen during communication with the remote smtp server.</div><div class="">Will also report failures if it can’t resolve the domain or find a MX server.</div><div class=""><br class=""></div><div class="">Late bounces (sent by the remote mail agent) must be handled by your own code.</div><div class=""><br class=""></div><div class="">In Zotonic we have an example of handling such bounces.<br class=""><div><br class=""></div><div>Check for our mail sending code (which also uses mnesia for queueing):</div><div><br class=""></div><div><a href="https://github.com/zotonic/zotonic/blob/master/apps/zotonic_core/src/smtp/z_email_server.erl" class="">https://github.com/zotonic/zotonic/blob/master/apps/zotonic_core/src/smtp/z_email_server.erl</a></div><div><br class=""></div><div>And for receiving email, including parsing and handling of bounce messages:</div><div><br class=""></div><div><a href="https://github.com/zotonic/zotonic/tree/master/apps/zotonic_listen_smtp/src" class="">https://github.com/zotonic/zotonic/tree/master/apps/zotonic_listen_smtp/src</a></div><div><br class=""></div><div>Cheers,</div><div><br class=""></div><div>Marc</div><div><br class=""></div><div><br class=""></div><div><blockquote type="cite" class=""><div class="">On 13 Jan 2021, at 09:18, Frank Muller <<a href="mailto:frank.muller.erl@gmail.com" class="">frank.muller.erl@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" class="">Hi everyone</span><br style="color:rgb(212,212,213);font-family:-apple-system,HelveticaNeue;word-spacing:1px" class=""><br style="color:rgb(212,212,213);font-family:-apple-system,HelveticaNeue;word-spacing:1px" class=""><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" class="">I’m considering using gen_smtp (</span><a href="https://github.com/gen-smtp/gen_smtp" rel="noreferrer" style="font-size:1rem;word-spacing:1px;border-color:rgb(66,133,244)" target="_blank" class="">https://github.com/gen-smtp/gen_smtp</a><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" class="">) in one of my apps.</span></div><div style="background-color:rgba(0,0,0,0);border-color:rgb(255,255,255)" class=""><font style="border-color:rgb(49,49,49);color:rgb(49,49,49)" class=""><br style="color:rgb(212,212,213);word-spacing:1px" class=""></font><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" class="">Question: is there a way to be notified on failed delivery message if for example the destination email address was misspelled?</span><br style="color:rgb(212,212,213);font-family:-apple-system,HelveticaNeue;word-spacing:1px" class=""><br style="color:rgb(212,212,213);font-family:-apple-system,HelveticaNeue;word-spacing:1px" class=""><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" class="">Thanks</span></div><div class=""><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" class="">/Frank</span>
</div>
</div></blockquote></div><br class=""></div></body></html>