Solved

CDONTS best pratices for a mailing (with cf_cdonts_mail)?

Posted on 2004-03-29
18
288 Views
Last Modified: 2013-12-24
Hello,
Due to our recent migration to a new host, I had (was recomended) to use, as many of the cf developers there, CDONTS (thru the well-known custom tag).
It works perfectly so far for single mail sending at once but I haven't adapted yet some of my code related to my newsletters process i.e. mailing at once to many recipients, customizing on the fly every message with data related to some queries recordsets.
CFMail was fine with that, tks to the 'query' field.
So I'm wondering what would be the best coding when using cf_cdonts_mail instead of cfmail, to preserve SMTP server performance and queueing matters.
Will I really need to loop through my query recordset and doing a cf_cdonts_mail in *each* record? Seems that the CF server will be more under pressure if we assume there'd be some 3000+ recipients (loops).
Is there another way to make it lighter?
Besides, and if you replied that at least I have to split my outgoing mails by successive smaller chunks, what would be the best coding to do the whole sending by chunks and by chunks of how many? Using scheduling pages? How long between each 'shot'?

Tks in advance.
Ernest
0
Comment
Question by:ErnestLefriteur
  • 5
  • 4
  • 4
  • +2
18 Comments
 
LVL 9

Expert Comment

by:shooksm
Comment Utility
Although I am not to familiar with the cf_cdonts_mail tag, one concern I would have is how long it will be supported.  If you host upgrades to windows 2003, CDONTS will no longer be available.  Microsoft is recommending everyone switch to CDOSYS.

Another thing to look at is does you host have a list server that you can use instead of custom pages.  If not, maybe evaluate a host that does.  List servers are a lot easy to maintain vs custom pages.  Plus they allow your newsletter subscribers to quickly unsubscribe by simply replying back to a specific account or putting unsubscribe in the subject or message.  If you need a host that supports cold fusion and list servers, let me know.
0
 

Author Comment

by:ErnestLefriteur
Comment Utility
shooksm,

tks for the tip, I didn't know about that recommendation and CDOSYS. I'll investigate it. Any custom tag to use it easily? Do you/they (MSFT) mean that we can already switch to CDOSYS when still siting on a Server 2000? Some benefits about perfomance and reliability?

Yes, I can add a list feature with an extra monthly cost (I'm at CrystalTech shared plans). That'd be a nice solution indeed but I haven't investigated yet in this direction. I wonder how I can bridge my users' data collected from the website and its db (sql server 2000) to the users' list in that list application with no or minimal manual intervention? And reverse (updating my db when a user unsubsribe thru the list system)?

Besides, I still welcome any solutions regarding my inquiry.

Ernest
0
 
LVL 9

Expert Comment

by:shooksm
Comment Utility
http://support.microsoft.com/default.aspx?scid=kb;en-us;315197 - Windows 2003 does not install CDONTS
http://support.microsoft.com/default.aspx?scid=kb;en-us;810702 - Info on migrating from CDONTS to CDOSYS

You will have to find out features that your host's list server provides.  Usually you can subscribe to a list by sending the list account an email with the keyword subscribe in the subject or message body.  So, when a user signs up on your website, you fake a subscription email using CFMAIL to the list with the users email as the from.  If someone wants to unsubscribe from your website, you fake another email from the user with the unsubscribe keyword in the subject or message body.  As far as synching your user list with the acutual records in the list, usually lists have a way of running administrative commands.  For example there may be a showall users command that you put in the subject.  The list server then generates a message with all the users.  So you could schedule a CF page on a nightly/weekly basis to send the show all users email to the list server.  You could then use CFPOP to retrieve the message and use it contents to synch your website database with your list server.  Hope this gives you some ideas.
0
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 20 total points
Comment Utility
I have heard that in general you want to send small chunks of email messages and pause between every couple hundred or so - otherwise your sever could be blacklisted as a spamming site.  There are some FAQs about this especially with CrystalTech that you should be able to find.
0
 
LVL 5

Expert Comment

by:Seth_Bienek
Comment Utility
Couple of questions:
 o Are you using CF 5.X or CFMX?
 o Do you have SMTP access to your own mail server, or even better, a mailing list server?

We'll go from there.

Regards,

Seth
0
 
LVL 5

Expert Comment

by:Seth_Bienek
Comment Utility
Disregard the second part of that second question.

You might consider outsourcing the list server, per shooksm's suggestion.  Just because you can use a screwdriver to hammer in a nail doesn't mean you should. :)

Seth
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
If he is on CrystalTech then he does not have access to his own SMTP server.

I think CrystalTech is using CFMX unless you specifically request CF 5
0
 
LVL 5

Expert Comment

by:Seth_Bienek
Comment Utility
He may not have access to his own server through CrystalTech, but may have access either in-house or through another organization.  Many companies who outsource their web environment run their email servers in-house, and many admin their own email servers via their service provider.  This is a legitimate question, perhaps I should have elaborated more.

Crystaltech supports CFMX and CF5.  Many apps are developed on 5 and kept there intentionally.  Unfortunately. :)  If we're looking at alternatives to CDONTS, then it is important to consider the app platform.

Seth
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
I agree, I was just trying to shed some light based on what I know of CrystalTech.
0
Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

 

Author Comment

by:ErnestLefriteur
Comment Utility
Tks all of you.
I'm on CF5 and using the smtp related to my mail account at CT.
I know (heard) that cfmail is better in CFMX. Someday, I'll get there. In the meantime i like cf5 very much. Anyway...
CT restricts the FROM value of a cfmail to be one of the email account owner/alias, for security reasons, therefore cdonts is the alternative to handle emails in services such as Ecards, Send to a friend, where the From should be the real sender (ouside our domains). Moreover, cfmail on CF5 servers at CT is a known issue, confirmed by their support who recommend CFMX.
Nevertheless, it seems that the list alternative is confirmed by you guys.
However, and in case I'll need it for some applications, I'm still interested in knowing how to send a 'moderate' amount of messages with cdonts or cdosys (looping the query with the tag inside each loop?) without puting too much weight on resources.

Ernest
0
 
LVL 5

Assisted Solution

by:Seth_Bienek
Seth_Bienek earned 40 total points
Comment Utility

You can specify multiple recipients in CDONTS by seperating email addresses with a semicolon (as long as the message body is the same).  If you don't want to expose the email addresses, list them in the BCC parameter instead.

If you need the message body to be dynamic as well (and it looks like you do), then the only way to do this is to loop through each record.  If you think about it, it makes sense - the only way you can send each recipient a customized email is to look at their information before building the message.

I would contact tech support over at CT and let them know what you are wanting to do - they will likely be acommodating in helping you to schedule a process that runs at night so you don't bog down their server during peak hours, or perhaps they can propose a solution that we haven't discussed here.  After all, only they know exactly what resources are available to you.

As a side note, they offer (1) list server free to new accounts.  If you end up going this route, you shouldn't have to pay extra for it.

Hope this helps,

Seth
0
 

Author Comment

by:ErnestLefriteur
Comment Utility
Seth,
tks for confirming what I suspected (the looping) as I need to customize. I was aware of the mutli addresses with semicolons but too limited for me.
Anyone else confirming the solution or making an objection?

We've posted in the CT forum/CF too and expecting some feedback too.
CT makes easy for programming scheduled actions, so I'd not need their help if I needed to send on quiet hours.

Free list at CT: I don't think so, or haven't heard / seen. Quote: "Mailing Lists/List Services are available for $10/month (10 list maximum). ". Anyway, it's not a big deal if it makes the job easy.

Ernest
0
 
LVL 5

Expert Comment

by:Seth_Bienek
Comment Utility

I was just looking at CT's site (KB634) - it says "There is a fee for mail list access."

I had seen it a while back, and misread it, thought it said "free mail list access". :D

Anywho...

Good Luck!

Seth
0
 
LVL 9

Accepted Solution

by:
shooksm earned 45 total points
Comment Utility
I would agree, looping will work.  I use it on a small scale with about 200+ emails being sent out at a time.  If you want to break up yours into muliple sends you could use the TOP command in your SQL.  Just add some type of field to indicate when the last message was sent or the id of the last message sent:

<cfquery name="qryUsers">
     SELECT TOP 500 *
          FROM tblUsers
          WHERE intLastMessageID <> <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#intCurrentMessageID#">
</cfquery>
<cfloop query="qryUsers">
     <cfmail ...>...</cfmail>
     <cfquery>
          UPDATE tblUsers
               SET intLastMessageID = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#intCurrentMessageID#">
               WHERE intUserID = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#qryUsers.intUserID#">
     </cfquery>
</cfloop>

Then just schedule this to run however many times necassary to get through you current users.
0
 
LVL 17

Assisted Solution

by:anandkp
anandkp earned 20 total points
Comment Utility
JFYI : CFMX 6.1 & CFMAIL can do the job for u - without having to bother abt 3000+ emails.

have a look at the document & decide for urself !
http://builder.com.com/5100-6371-5093805.html
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
anandkp,
The problem is not that CF cannot handle the large quantity of email - it can.

The problem is that a lot of mail server out there will blacklist IPs that send that many email messages in a short time frame.
0
 
LVL 17

Expert Comment

by:anandkp
Comment Utility
huh ?
0
 

Author Comment

by:ErnestLefriteur
Comment Utility
Tks to all of you. I'll do the loop then and arrange to split my sendings.
Bye.
Ernest
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now