• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

NewsLetter type of application

Explorer ,
Oct 19, 2006 Oct 19, 2006

Copy link to clipboard

Copied

Good day,

I am building a simple NewsLetters type of application and need to email the templte filled out of DB information. This is not a problem but I find a problem when I am sending out the template. My DB contain 600 email adresses. The problem I have is, it seams that CF 7MX is not sending 1 email per adresse so my logs reports that sometimes 90 emails are sent and sometimes 200 but it seams that It is not going true my entire listing.

Does anyone have a potential solution for that?

My code is like:

TOPICS
Advanced techniques

Views

475

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

Is that really close to what your mail server is name or did you tweek that
for this example. Mine is something like mail.mailserver.com.
Might not help you answer right now, but that is making me curious and just
wanted to know. I haven't seen a @ symbol in a mailserver address.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

I wonder if your email server is having problems with sending them in loads?
I have a mailer system that sends out 5,000 per run and has no problem. I
also had to build a delay into the loop so it sends in 200 email blocks.

Your code seems to be fine, except I am not sure how accurate the
spoolEnable is and how it actually works.

My impression was, and I am sure I am mistaken, when looking at the CF
admin, it was telling me that it looks for new emails to send every 15
seconds, no matter how many are ready to go. So, if you system is 'good' it
could have all 600 emails ready to go at once which could choke your
mailserver. Again, I might be wrong, I am not the System Administator... 🙂


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

Hi Wally,

The server name is not blablabla.ca just a tweek for diplaying code on this forum.

This is exactely my question about the delay. How do you build it?
My server is quit robust 8 processors 16 Gig ram on a T3 line, so it should handle it no problems

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

I am sure mine is not the most graceful, but it works. It does run on the
client side so it hangs the page and needs to keep open, but should be that
bad for a short run like 600.

After the last </cfmail> and before the </cfloop> I put:

<cfset i = i + 1>
<cfset t = Now()>
<cfset nt = Now()>
<cfif i GT 200>
<cfloop condition="nt LTE t + (1/1440)">
<cfset nt = Now()>
</cfloop>
<cfset i = 0>
</cfif>

It counts the mails up to 200.
When it reaches 200, it sets t and 'nt' to Now().
Then it 'asks' does nt = t plus 1 minute.
If not, it loops nt till it reaches 1 minute.
When it does it sends off another 200 emails.

That works for my mailserver.

So in your code it would be something like:
<cfloop query="DistributionListEmail">
<cfset i = 0>
<cfmail to = "#DL_Email#" from = "info@blablabla.ca" subject = "Message"
spoolenable="yes" failto="info@blablabla.ca" replyto = "info@blablabla.ca"
type = "html" debug = "no" charset="iso-8859-1"
server="info@blablabla.ca" username="admin" password="mailout">

My content

</cfmail>
<cfset i = i + 1>
<cfset t = Now()>
<cfset nt = Now()>
<cfif i GT 200>
<cfloop condition="nt LTE t + (1/1440)">
<cfset nt = Now()>
</cfloop>
<cfset i = 0>
</cfif>
</cfloop>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

This is greate

Can you set time delay somewhere?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

LATEST
The 1/1400 is the time delay. ( 1 minute) You can set it to anthing you like
either statically or dynamically.

Here is the formula.

60 minutes in an hour * 24 hours in a day = 1440

1/1400 is 1 minute


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation