This is a discussion on "CDONTS Email" within the Classic ASP section. This forum, and the thread "CDONTS Email are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
CDONTS Email
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
CDONTS Email
I'm using the script below to send mass email from a subscriber list. Using SQL 2K and ASP. I have a couple questions and or concerns about performance. The function will be available to web users, to send emails to people who meet criteria in a table. My best guess would be a max of 2500 users sending 1000 emails at any give time. Since my questions are what if, I don't expect any definite answers, just observations.
Any pros or cons to using CDONTS What If more than one person hits the "Send" button at the same time Are emails generally put into que if server is down or something goes wrong at time of sending, or is that batch simply lost. What I would like is see is either a list or count of emails sent to confirm to user that emails were actually sent. After looking at the code below, if someone could assist in this last function, it would be greatly appreciated. If a list, would like to see "Recipient - EmailAddress - Yes". <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit Dim Mailobj Dim objMail Dim Sender Dim Rs Dim RSBODY DIM MYCONN Dim SQL Dim tkey Dim newSQL Dim sBody Dim xDb_Conn_Str Dim adexecutenorecords Dim URL, Body URL = Request.QueryString("URL") %> <% Dim HTTP_REFERRER Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "Cache-Control", "no-cache" If Not(IsObject(Session("UID"))) Then If Session("UID") = "" Then HTTP_REFERRER = Request.ServerVariables("URL") If Request.QueryString <> "" Then HTTP_REFERRER = HTTP_REFERRER & "?" & Request.QueryString Response.Redirect "login.asp?HTTP_REFERRER=" & Server.URLEncode(HTTP_REFERRER) End If End If %> <% sBody = %> <% Set RS = Server.CreateObject("ADODB.Recordset") Set RSBODY = Server.CreateObject("ADODB.Recordset") set myConn = Server.CreateObject("ADODB.Connection") key = Session("OBIT").Item("ID") key2 = Session("OBIT").Item("Deceased") Sender = request.Form("From_Email") tkey = key SQL = "SELECT * FROM GBComments WHERE (NOT (EMail IS NULL)) AND EmailSent=0 AND DeceasedID=" & tkey RS.open SQL,xDb_Conn_Str Do While Not RS.eof set mailObj = Server.CreateObject("CDONTS.NewMail") If (Request("Format") = "Text") Then mailObj.BodyFormat = 1 mailObj.MailFormat = 1 Else mailObj.BodyFormat = 0 mailObj.MailFormat = 0 End If mailObj.From = "sales@something.com("&Sender&")" mailObj.To = RS("Email") mailObj.Subject = Request("Subject") mailObj.Body = sBody mailObj.Send RS.movenext If Err <> 0 Then Response.Write "Error encountered: " & Err.Description End If Loop myConn.Open xDb_Conn_Str newSQL = "Update GBComments SET EmailSent=1 WHERE (NOT (EMail IS NULL)) AND EmailSent=0 AND DeceasedID=" & tkey myConn.Execute(newSQL),,adexecutenorecords rs.close set rs = Nothing myConn.close set myConn = Nothing %> Thanks in advance Ernest |
|
|
|
|||
|
2500 users sending 1000 emails, each or total? Unless you own the server your ISP is probably going to suspend your hosting account for spamming, plus that's on the heavy side for using a script-based emailer.
IMO, you're probably better off using a dedicated mailing application. |
|
|||
|
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by ekendricks
Any pros or cons to using CDONTS What If more than one person hits the "Send" button at the same time Are emails generally put into que if server is down or something goes wrong at time of sending, or is that batch simply lost. <hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote"> CDONTS is outdated, you should be using CDOSYS for improved reliability and performance. CDONTS (and CDOSYS) simply creates an RFC 822 compliant text file (email) and places it in the Microsoft SMTP Server "Pickup" directory. If more than one person hits the send button at the same time it shouldnt cause a problem, but it will slow things down. Yes emails are queued and retried if required. Unsendables are placed in the BadMail directory. I think Catalyst is right tho, if you are doing this in a shared environment, your host probably wont allow it. Get yourself a dedicated server. |
![]() |
| Tags |
| cdonts, email |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP email form not sending email | Kurt | PHP Forum | 1 | Oct 12th, 2007 04:26 |
| Form submits to email via php, but email is blank!!?? | DH1234 | PHP Forum | 2 | Jun 18th, 2007 10:42 |
| Cdonts | air duster | Classic ASP | 5 | Dec 21st, 2005 13:19 |
| html cdonts from access | benbramz | Classic ASP | 6 | Jun 14th, 2005 22:45 |
| MIME type for email with CDONTS | GillBates | Classic ASP | 8 | Dec 1st, 2003 15:19 |