CDONTS Email

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 29th, 2004, 01:55
Junior Member
Join Date: Aug 2003
Location: USA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
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

  #2 (permalink)  
Old Jan 29th, 2004, 05:34
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
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.
  #3 (permalink)  
Old Jan 29th, 2004, 08:54
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
<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.
Closed Thread

Tags
cdonts, email

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 06:28.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43