Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CDONTS best pratices for a mailing (with cf_cdonts_mail)?

Posted on 2004-03-29
18
Medium Priority
?
298 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 4
  • +2
18 Comments
 
LVL 9

Expert Comment

by:shooksm
ID: 10706081
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
ID: 10706275
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
ID: 10706535
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
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 60 total points
ID: 10706856
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
ID: 10707139
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
ID: 10707171
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
ID: 10707175
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
ID: 10707245
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
ID: 10707344
I agree, I was just trying to shed some light based on what I know of CrystalTech.
0
 

Author Comment

by:ErnestLefriteur
ID: 10708092
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 120 total points
ID: 10708306

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
ID: 10708540
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
ID: 10708654

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 135 total points
ID: 10708688
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 60 total points
ID: 10711576
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
ID: 10714718
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
ID: 10721954
huh ?
0
 

Author Comment

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

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
What You Need to Know when Searching for a Webhost Provider
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

609 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