<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged maildispatcher</title>
<link>https://overflow.efficy.io/?qa=tag/maildispatcher</link>
<description>Powered by Question2Answer</description>
<item>
<title>Knowing if Efficy.sendExternalMail failed</title>
<link>https://overflow.efficy.io/?qa=4235/knowing-if-efficy-sendexternalmail-failed</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;For one of our customer we tried want to implement a complex flow were in the end, people get mails. We will use the function &lt;code&gt;Efficy.sendExternalMail&lt;/code&gt; for that.&lt;/p&gt;

&lt;p&gt;The customer asked me a really good question. How can we know that the mail was actually send ?&lt;/p&gt;

&lt;p&gt;I tried this in a scheduler :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Efficy.sendExternalMail('lbe[at]efficy.com', 'lbe[at]efficy.com', '', 'hello ?', 'test test test');

Efficy.sendExternalMail('lbe[at]efficy.com', 'superman[at]efficy.com', '', 'hello ?', 'test test test');

Efficy.sendExternalMail('lbe[at]efficy.com', 'efficy[at]ab78cdefghijkl4mnokqrst.com', '', 'hello ?', 'test test test');

Efficy.sendExternalMail('superman[at]efficy.com', 'efficy[at]ab78cdefghijkl4mnokqrst.com', '', 'hello ?', 'test test test');
&lt;/code&gt;&lt;/pre&gt;

&lt;ol&gt;
&lt;li&gt;The first one is a real address, sending to a real address&lt;/li&gt;
&lt;li&gt;The second one is a real address, sending a to a fake adresse ( I think ), but the domain exist&lt;/li&gt;
&lt;li&gt;The third one is a real address, sending to a fake address, except the domain does not exist (I am pretty sure. I didn't check :) )&lt;/li&gt;
&lt;li&gt;The fourth one is a fake address, sending to a fake address, and the domain does not exist&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's what I can find in SYS_MAIL after the scheduler :&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=15599451128798894261&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;After the mail dispatcher did his job, here is what I got in my mailbox (&lt;em&gt;Emails are not allowed&lt;/em&gt;) :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First mail was obviously a sucess&lt;/li&gt;
&lt;li&gt;I got a response from the @efficy smtp for the second address&lt;/li&gt;
&lt;li&gt;Still no news from the second&lt;/li&gt;
&lt;li&gt;And the fourth, I don't expected much, but I got nothing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In sys_mails : the table is empty.&lt;/p&gt;

&lt;p&gt;If theses mails had been sent by, my Outlook, I would have received an error for the third one.&lt;/p&gt;

&lt;p&gt;The demand of the customer is simple. He want to be warn when an email was not successfully sent. &lt;/p&gt;

&lt;p&gt;How can I respond to that ? &lt;/p&gt;

&lt;p&gt;Regards, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4235/knowing-if-efficy-sendexternalmail-failed</guid>
<pubDate>Tue, 14 May 2019 21:37:25 +0000</pubDate>
</item>
</channel>
</rss>