<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged sendexternalmail</title>
<link>https://overflow.efficy.io/?qa=tag/sendexternalmail</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>
<item>
<title>multiple mail template using a document template</title>
<link>https://overflow.efficy.io/?qa=3545/multiple-mail-template-using-a-document-template</link>
<description>&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;I want to add a button on Project which have to send mail to all contacts linked to the project.&lt;br&gt;
I know how to create the button but the mail will use a Mail Template to generate the mail body, and each mail have to contain an attachment, this attachment come from a Document Template.&lt;/p&gt;

&lt;p&gt;I think my script have to :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get the ntCont detail dataset of the Project and loop on it&lt;/li&gt;
&lt;li&gt;For each Contact&lt;br&gt;
2.1 merge the Word/PDF Template&lt;br&gt;
2.2 merge the Mail Template&lt;br&gt;
2.3 Link the both&lt;br&gt;
2.4 Send the mail with &quot;SendExternalMail&quot; ?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have some questions :&lt;br&gt;
&lt;strong&gt;Can I send all the mail with only one call ? (after the loop ?)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Questions for the Word/PDF Template :&lt;br&gt;
The function will be call on the Project consult view.&lt;br&gt;
My function will get the Contacts detail dataset and launch the Template for each of them. In this template I use these macro :&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;[$=COMP.NAME]  --&amp;gt; need the Main Company NAME of the Contact&lt;br&gt;
  [$=CONT.NAME]  --&amp;gt; need the current Contact name&lt;br&gt;
  [$=OPPO.NAME] --&amp;gt; need the Main Opportunity name of the project&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;How can I get all of these data ? If I call &lt;em&gt;MergeTemplate&lt;/em&gt; with the Contact Edit Context, I think CONT.NAME and COMP.NAME will be good, but I don't think the OPPO.NAME will be the good one : Efficy will take the main oppo of the contact, and not of the project.&lt;br&gt;
&lt;strong&gt;I think I can get this name before and pass it as argument it to the template (param of &lt;em&gt;MergeTemplate&lt;/em&gt;), how to use it in the template ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;SendExternalMail&lt;/em&gt; don't specify how to join a file, have I just to link the mail to the ntFile ?&lt;/strong&gt;&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3545/multiple-mail-template-using-a-document-template</guid>
<pubDate>Fri, 14 Sep 2018 08:01:13 +0000</pubDate>
</item>
<item>
<title>BCC in SendExternalMail possible???</title>
<link>https://overflow.efficy.io/?qa=2771/bcc-in-sendexternalmail-possible</link>
<description>&lt;p&gt;SendExternalMail(SendFrom, SendTo, SendCc, Subject, Body: string; [Entity: TEntityHandle = ntNone]; [IDLinked: double = 0], SendCode: string)&lt;/p&gt;

&lt;p&gt;There is no BCC option here, is it possible to send a mail from Efficy in BCC.&lt;br&gt;
Client wants to use The Mailings to send mails to committees (from publications) and certain persons need to be put in BCC or CC&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2771/bcc-in-sendexternalmail-possible</guid>
<pubDate>Tue, 28 Nov 2017 09:57:20 +0000</pubDate>
</item>
<item>
<title>How having an attachement into a SendExternalMail function ?</title>
<link>https://overflow.efficy.io/?qa=2402/how-having-an-attachement-into-sendexternalmail-function</link>
<description>&lt;p&gt;I must create an attachement from a crystalReport joint into an external mail generated into a serverScript called into a guest page.&lt;/p&gt;

&lt;p&gt;Any idea to send an email with a generated pdf via serverScript ? &lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2402/how-having-an-attachement-into-sendexternalmail-function</guid>
<pubDate>Mon, 20 Mar 2017 12:33:42 +0000</pubDate>
</item>
</channel>
</rss>