Note that there are some explanatory texts on larger screens.

plurals
  1. POIndividual mail sending does not work while mailing within loop works
    primarykey
    data
    text
    <p>I have created a function that sends mail to my email id using different mail ids. The setting of the different mail ids are stored in mailpresets table. The problem is that when I send the mails using loop, the mails are received.</p> <pre><code>&lt;cffunction name="processFormSubmission"&gt; &lt;cfset template = model("mailpreset").findAll() /&gt; &lt;cfloop query="template"&gt; &lt;cfmail from="#template.fromEmail#" to="test@test.com" server="#template.serverHostName#" username="#template.serverUserName#" port="#template.serverPort#" password="#template.serverPassword#" subject="Mail from #template.fromEmail#" type="html" usessl="#template.useSSL#" usetls="#template.useTLS#"&gt; #template.fromEmail# &lt;/cfmail&gt; &lt;/cfloop&gt; &lt;cfabort&gt; &lt;/cffunction&gt; </code></pre> <p>But when I use single mail preset for sending mail the mail does not get sent. The mail get send with the same mailpreset when send using the previous method.</p> <pre><code>&lt;cffunction name="processFormSubmission"&gt; &lt;cfset template = model("mailpreset").findAll(where="id=7") /&gt; &lt;cfmail from="#template.fromEmail#" to="test@test.com" server="#template.serverHostName#" username="#template.serverUserName#" port="#template.serverPort#" password="#template.serverPassword#" subject="Mail from #template.fromEmail#" type="html" usessl="#template.useSSL#" usetls="#template.useTLS#"&gt; #template.fromEmail# &lt;/cfmail&gt; &lt;cfabort&gt; &lt;/cffunction&gt; </code></pre> <p>What is the problem behind it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload