<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged system-mail-dispatch</title>
<link>https://overflow.efficy.io/?qa=tag/system-mail-dispatch</link>
<description>Powered by Question2Answer</description>
<item>
<title>What are the fields SHOWN and MAILREAD for in SYS_MAILS ?</title>
<link>https://overflow.efficy.io/?qa=5894/what-are-the-fields-shown-and-mailread-for-in-sysmails</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;My question would be similar to the existing tread:  &lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.io/?qa=1797/required-conditions-for-a-mail-to-be-sent-from-sysmails&quot;&gt;https://overflow.efficy.io/?qa=1797/required-conditions-for-a-mail-to-be-sent-from-sysmails&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But I also would like to know what do the SHOWN and MAILREAD stand for in SYS_MAILS table. Are they used somehow ? &lt;/p&gt;

&lt;p&gt;Some details about the client emails in SYS_MAILS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the K_USER has email defined in designer except of Administrator&lt;/li&gt;
&lt;li&gt;the MAILFROM and MAILTO fields are field&lt;/li&gt;
&lt;li&gt;Mail Dispatcher doesn't find emails but the SYS_MAILS table has about 425 mails stored&lt;/li&gt;
&lt;li&gt;the SYS_MAILS.KIND field for remaining emails is 5&lt;/li&gt;
&lt;li&gt;all remaining email have 1 in SHOWN field&lt;/li&gt;
&lt;li&gt;some of the remaining emails have 0 or 1 in MAILREAD field&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;p&gt;&lt;strong&gt;Update 1:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;I've tried to play around with email fields.&lt;/p&gt;

&lt;p&gt;Case 1 : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;when email is first generated it has : KIND = 5, SHOWN = 1 MAILREAD=1.&lt;/li&gt;
&lt;li&gt;the ADMIN (K_USER) has no email defined. &lt;br&gt;
=&amp;gt; Mail not found in Mail Dispatch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Case 2: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if I change KIND = 0&lt;/li&gt;
&lt;li&gt;the ADMIN (K_USER) has no email defined. &lt;/li&gt;
&lt;li&gt;Mail Dispatch : &lt;br&gt;
&lt;em&gt;Mails Found: 1&lt;br&gt;
  [2021/02/12 11:33:52.107]       Skipped (user 2): &quot;Email subject&quot;&lt;br&gt;
  [2021/02/12 11:33:52.107]     ...0 Mails Sent&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Case 3: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;KIND = 0&lt;/li&gt;
&lt;li&gt;define email for ADMIN (designer &amp;gt; Users)&lt;/li&gt;
&lt;li&gt;Mail Dispatch: &lt;br&gt;
&lt;em&gt;Mails Found: 1&lt;br&gt;
[2021/02/12 11:56:01.909]        --&amp;gt; someemail: &quot;Email subject&quot;&lt;br&gt;
[2021/02/12 11:56:01.925]     ...1 Mails Sent&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Result: I've never received the email though. Maybe SMTP server related. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Case 4: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;admin email defined &lt;/li&gt;
&lt;li&gt;new email created&lt;/li&gt;
&lt;li&gt;=&amp;gt; still KIND = 5, SHOWN = 1 and MAILREAD = 1&lt;/li&gt;
&lt;li&gt;Mail Dispatch :&lt;br&gt;
No mails found&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If I understand right : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if KIND = 5  Mail &lt;br&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;Dispatch ignores email from SYS_MAILS&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;if KIND = 0 but K_USER has no email defined&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;email found but not send as email is not provided&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So my question would be:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How &lt;strong&gt;Efficy.sendExternalMail&lt;/strong&gt; assigns the field KIND, SHOWN, MAILREAD ? What is the logic behind ? Why some emails have KIND= 0 and another one KIND = 5 ?&lt;/em&gt;&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;I forgot to mention that the checkbox &lt;strong&gt;&lt;em&gt;&quot;Send external mails created from workflow&quot;&lt;/em&gt;&lt;/strong&gt; hasn't been checked. After checking it the Mail Dispatch was able to get the emails with KIND = 5. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;K_USER has no email&lt;/li&gt;
&lt;li&gt;KIND = 5&lt;/li&gt;
&lt;li&gt;Mail Dispatcher : find emails and send them (but in case of the client I've got error : &lt;em&gt;&quot;Unable to relay for EMAILSAMPLE&quot;&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5894/what-are-the-fields-shown-and-mailread-for-in-sysmails</guid>
<pubDate>Fri, 12 Feb 2021 09:08:58 +0000</pubDate>
</item>
<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>
<item>
<title>&quot;Duplicate(s) found&quot; notification stuck in SYS_MAILS - how to change recipient</title>
<link>https://overflow.efficy.io/?qa=4082/duplicate-found-notification-sysmails-change-recipient</link>
<description>&lt;p&gt;HI all,&lt;/p&gt;

&lt;p&gt;I just found out that quite a  bunch of emails got stuck in SYS_MAILS, because of a recipient that has no email address. The efficy mail dispatcher had to wait until those emails got deleted...&lt;/p&gt;

&lt;p&gt;Those emails were created by the DoubleFinder.&lt;br&gt;
Here is the question: How does the DoubleFinder determine the recipient and can I change this behaviour?&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;Tim&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4082/duplicate-found-notification-sysmails-change-recipient</guid>
<pubDate>Wed, 03 Apr 2019 07:25:41 +0000</pubDate>
</item>
<item>
<title>System Mail Dispatch: Mails found but not sent</title>
<link>https://overflow.efficy.io/?qa=13/system-mail-dispatch-mails-found-but-not-sent</link>
<description>&lt;p&gt;I am creating a workflow in which e-mails are sent on certain conditions. When I click on &quot;run&quot; in the System Mail Dispatch, the logs display &quot;Mails found: 5, ...0 Mails sent&quot;. How can I solve this problem?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=13/system-mail-dispatch-mails-found-but-not-sent</guid>
<pubDate>Thu, 18 Sep 2014 15:39:16 +0000</pubDate>
</item>
</channel>
</rss>