• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

CDONTS best pratices for a mailing (with cf_cdonts_mail)?

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
ErnestLefriteur
Asked:
ErnestLefriteur
  • 5
  • 4
  • 4
  • +2
4 Solutions
 
shooksmCommented:
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
 
ErnestLefriteurAuthor Commented:
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
 
shooksmCommented:
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
mrichmonCommented:
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
 
Seth_BienekCommented:
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
 
Seth_BienekCommented:
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
 
mrichmonCommented:
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
 
Seth_BienekCommented:
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
 
mrichmonCommented:
I agree, I was just trying to shed some light based on what I know of CrystalTech.
0
 
ErnestLefriteurAuthor Commented:
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
 
Seth_BienekCommented:

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
 
ErnestLefriteurAuthor Commented:
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
 
Seth_BienekCommented:

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
 
shooksmCommented:
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
 
anandkpCommented:
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
 
mrichmonCommented:
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
 
anandkpCommented:
huh ?
0
 
ErnestLefriteurAuthor Commented:
Tks to all of you. I'll do the loop then and arrange to split my sendings.
Bye.
Ernest
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now