[thelist] CDONTS - 3 Questions

Adam Slesinger badlanners at hotmail.com
Mon Nov 4 15:21:28 CST 2002


Hi Peeps,

I'm designing a web admin tool to send out a mass html e-mail newsletter
using addresses from a database.  Here's the portion of my script that sends
the e-mail:

do while not rstemp.eof
   'Send Email
   set objCDOMail = server.createObject("CDONTS.NewMail")
   objCDOMail.From = strFrom
   objCDOMail.To = rstemp("email")
   objCDOMail.Subject = strSubject
   objCDOMail.BodyFormat = 0
   objCDOMail.MailFormat = 0
   objCDOMail.Body = strBody
   objCDOMail.Send
   set objCDOMail = nothing
rstemp.moveNext
loop

I've finished it off and it works fine, but I wanted to run 3 questions by
you all and get your input.

1) The database contains over 12,000 e-mails of people signed up for the
newsletter.  Should I have any concerns about the webserver running this
script?  I've tested it with 300 e-mails and it takes about 1 minute before
it finishes.  The live webserver is supposedly a power house, but should I
have the IT people make sure that any sort of buffer or memory settings are
tweaked for sending so many e-mails?  Is there a chance my script may time
out?

2) I learned that BodyFormat and MailFormat make it possible for this to be
an html formatted e-mail.  I would prefer to be able to send the e-mail as
plain text as well if the person doesn't support html e-mail.  How do I go
about sending a 2 part e-mail with ASP/vbScript without implementing
someone's 3rd party e-mailer tool?  Is it possible without super-complex
additional scripting?

3) My strBody variable comes from an include file that contains just the
body.  It's an entire html formatted piece and here's just the top of it:

strBody = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>" &
vbCRLF &_
   "<html>" & vbCRLF &_
   "<head>" & vbCRLF &_
   "<title>Newsletter</title>" & vbCRLF &_
   "</head>" & vbCRLF &_
   "<body marginheight='5' marginwidth='5' topmargin='5' leftmargin='5'
link='#003399' vlink='#003399'>" & vbCRLF &_
   "<table cellpadding='0' cellspacing='0' border='0'>" & vbCRLF &_

It was a pain in the butt to have to format this html as an ASP variable.
Is there anyway to leave it alone and have ASP bring it in and automatically
format each line?  Or do I have to create it like this every time?

Thanks all for taking the time to read this!

bread_man

"Ein halber Laib ist besser als gar kein Brot."



More information about the thelist mailing list