Friday, March 16, 2007

CDONTS, CDOSys, and a Blank Email Address

Anyone who has migrated a legacy ASP application to Win2003/IIS6 is familiar with CDONTS and CDOSys. Code that sends email via CDONTS stops working in W2k3/IIS6 because there is no CDONTS.dll!

Code must be migrated from using CDONTS.NewMail to CDOSys.Message. Required changes are fairly straightforward.

Here's a subtle difference: your ASP application under CDONTS will not visibly fail if you provide an empty string "" for the email address. Rather, the email message will fall into your ISP's bad mail bin. CDOSys, on the other hand, will throw an error, and the application will quit on the end user if the error is unhandled.

Here are proof of concept scripts to show you the variance. You can run these from a command prompt:

CDONTS(Won't fail)
wscript.echo "creating cdonts object!"
dim mailObj : set mailObj = CreateObject ("CDONTS.NewMail")
wscript.echo "created"
mailObj.From = "TestAddress@blogger.com"
mailObj.To = ""
mailObj.Subject = "hallo"
mailObj.Body = "hello there"
mailObj.BodyFormat = 1
mailObj.MailFormat = 0
mailObj.Send()
wscript.echo "mail sent, supposedly"
set mailObj = Nothing

CDOSys(Will Fail)
dim objCDOMailer : Set objCDOMailer = CreateObject("CDO.Message")
objCDOMailer.To = ""
objCDOMailer.From = "TestAddress@blogger.com"
objCDOMailer.Subject = "hallo"
objCDOMailer.TextBody = "hello there"
objCDOMailer.Send set
objCDOMailer=nothing
wscript.echo "Message sent successfully!"

58 comments:

Anonymous said...

Buy cialis online pharmacy online
order cialis
bbcode is on cheap cialis
generic cialis bogus
cialis online online get cialis cheapest
discount cialis pills from india
cheapest online cialis
buy cialis ours pharmacy com buy cialis in singapore

Anonymous said...

Above, we purvey discount Viagra pharmacy, which is rather functional in dislike than other trendy http://ipod-playlist.com/viagra.html buy Viagra Online Erectile dysfunction Viagra dispensary online drugs.

Anonymous said...

...please where can I buy a unicorn?

Anonymous said...

http://www.tamizhtinseldreams.com/TTDForum/viewtopic.php?f=16&t=98576&p=131882
http://eng.sut.ac.th/5S/modules.php?name=Forums&file=viewtopic&p=77600
http://fire-investigation.org/forum/viewtopic.php?f=2&t=3997&p=10419

Anonymous said...

Se ha registrado especialmente en el foro para decirle gracias por la ayuda en esta pregunta. [url=http://csalamanca.com/comprar-viagra-generico/ ]la viagra funciona [/url] Esta frase es simplemente incomparable:), me gusta))) viagra sin receta

Anonymous said...

Esta respuesta, es incomparable http://nuevascarreras.com/tag/cialis-generico/ cialis efectos secundarios Senza opzioni .... [url=http://nuevascarreras.com/cialis/ ]comprar cialis original [/url]

Anonymous said...

Que frase simpГЎtica [url=http://csalamanca.com/ ]viagra online without prescription [/url] Es la condicionalidad regular http://csalamanca.com/category/viagra/ la viagra de la mujer

Anonymous said...

Mi dispiace, ma, a mio parere, si sono errati. Dobbiamo discutere. [url=http://lacasadicavour.com/cialis-generico-online/ ]generico viagra [/url]Credo che molto interessante argomento. Let's Talk con voi nel PM. http://lacasadicavour.com/tag/tadalafil/ acquisto cialis Quali parole ...

Anonymous said...

hay un anГЎlogo parecido? http://nuevascarreras.com/comprar-cialis-es/ cialis contraindicaciones Credo che si fanno errori. Cerchiamo di discutere di questo. Scrivere a me in PM. [url=http://nuevascarreras.com/cialis/ ]cialis 20 mg tadalafil [/url]

Anonymous said...

Es evidente os habГ©is equivocado... [url=http://csalamanca.com/ ]viagra sin receta en chile [/url] la pregunta Admirable http://csalamanca.com/ la viagra natural

Anonymous said...

Se puede es infinito hablar por esta pregunta. [url=http://csalamanca.com/tag/comprar-viagra/ ]viagra online contrareembolso [/url] Pienso que es la falta seria. http://csalamanca.com/comprar-viagra-generico/ viagra sin receta madrid

Anonymous said...

I do not understand

Anonymous said...

buy cheap buy AUGMENTIN online flomax nephrolithiasis pdf keflex and blindness buy cheap Lasix without prescription Kamagra buy canada lasix eye surgery Order Keflex Online By Fedex buy Augmentin now kamagra oral jelly gel *Buying Augmentin Pharmacy Without Prescription

Anonymous said...

Online Find Prograf Prescription Prograf Saler Premarin Overnight No Rx cheap prograf without prescription overnight delivery Take Avodart cheap Buy effective diet pills for women online mitral valve prolapse avodart buy buy Levitra now online Online Buy Avodart Without Prescription cod pay alesse

Anonymous said...

buy online order cheap AUGMENTIN cheap AUGMENTIN *Buy Cheap Augmentin On Line Buy best weight loss pills that work online amoxil dosage by weight *Online pharmacy Augmentin without a prescription cod purchase Amoxil in Abbotsford Avodart lowest prices *Buy 100 Mg Augmentin generic avodartgeneric avodart what nascar driver has cephalexin

Anonymous said...

Purchase Augmentin pharmacy Avodart american express Avodart next day does avodart work for women buy AUGMENTIN online order buy online boniva without prescription generic cialis pills levitra Generic C O D Cheap Cephalexin Avelox DELIVERY Buy Avodart online without a prescription and no membership amoxil dosage by weight

Anonymous said...

gay bare feet directory Indeed ... super creative! Classroom paper, by the way the author would like to offer yandeks.deneg chip set from the site, "Give the ruble." I would give, so to speak on the maintenance. On your blog, familiar in the ICQ link tossed. It turned out that nothing I liked. Tepr always read will You read this and think .... cool .. took almost all)) In my opinion you stole this article and placed on another site. I had already seen. Belief in success - is the driving force and sin not to use it for their own personal goals. Hmm ... well, it pamoymu have extreme ...

Anonymous said...

sex fights somewhere I have already seen this ... Yes, the internet - is vast, even if it is possible to find Very glad that there was a desire to take this position in quotations! A huge Thank you to you! and more posts on this topic will be in the future? It is waiting! zabavno You can still search in Google .. read with pleasure Very good site, but not bad-would make a version for smartphones.

Anonymous said...

It is very weighty to match adapted caution of all your ornaments pieces so that they last for a lifetime. There are unalike approaches and ways to decontaminated different types of jewels be it gold, silver-tongued, pearls, diamond or nonpareil stones. Outlined under the sun are the heterogeneous ways around which you can induce solicitude of your accessories and maintain them gleaming and novel always.

Anonymous said...

crescendo dating sim http://loveepicentre.com/ us famous dating sites

Anonymous said...

[url=http://www.microgiving.com/profile/clarithromycin]clarithromycin order online
[/url]

Anonymous said...

[url=http://sustiva-efavirenz.webs.com/]Generic Sustiva 500 mg online
[/url] purchase Generic Sustiva 200 mg online
purchase Sustiva 600 mg online
buy Sustiva 500 mg online

Anonymous said...

viagra for sale viagra no prescription - best rated online pharmacy viagra

Anonymous said...

generic viagra online buy viagra 50mg online - viagra online fast delivery

Anonymous said...

viagra online without prescription buy viagra paypal accepted - cheap viagra to buy online

Anonymous said...

viagra price viagra dosage duration - highest quality generic viagra

Anonymous said...

generic viagra order generic viagra online us - cialis vs viagra buy online

Anonymous said...

buy soma soma rx - soma pills

Anonymous said...

[url=http://loveepicentre.com/success_stories.php][img]http://loveepicentre.com/uploades/photos/7.jpg[/img][/url]
dating keuffel drafting tools [url=http://loveepicentre.com/advice.php]men with money dating sites[/url] dating scammers from ghana
tica tico dating [url=http://loveepicentre.com/articles.php]who dating sean paul[/url] interracial online dating site
georgia divorce dating [url=http://loveepicentre.com/articles.php]hiv positive gay male dating site[/url] the pro cons internet dating

Anonymous said...

buy soma 350mg buy soma online in florida - soma online overnight delivery

Anonymous said...

[url=http://casodex-bicalutamide.webs.com/]Calutide
[/url] purchase Bicalutamide online
Bicalupel
Zolacos

Anonymous said...



Feel freе tо ѵisіt my ωеb sitе;
angels tantra london
my page: erotic massage london

Anonymous said...

order soma deadly soma online movie - order soma ship texas

Anonymous said...

buy cialis online cialis 10 mg price - cialis $0.92

Anonymous said...

buy soma online soma puzzle - buy soma 350 mg online

Anonymous said...

buy soma soma san diego tumblr - online soma

Anonymous said...

buy tramadol tramadol withdrawal symptoms and duration - help buy tramadol

Anonymous said...

buy cialis online buy cialis mexico - cialis coupon voucher

Anonymous said...

buy xanax valium online florida xanax generic pink - drug test with xanax

Anonymous said...

alprazolam mg xanax overdose milligrams - can xanax overdose kill you

Anonymous said...

buy xanax online no prescription overnight 1mg xanax to sleep - xanax bars show up on drug test

Anonymous said...

buy carisoprodol many carisoprodol 350 mg get high - erowid carisoprodol 350 mg

Anonymous said...

tramadol no prescription tramadol withdrawal symptoms how long - buy tramadol 6914

Anonymous said...

generic xanax 3mg xanax and alcohol - kind drug xanax

Anonymous said...

buy tramadol tramadol for dogs uses - tramadol hcl

Anonymous said...

xanax online xanax dosage by color - drug interactions xanax vicodin

Anonymous said...

buy cialis online generic cialis tadalafil - generic cialis line

Anonymous said...

buy cialis online cheap cialis levitra - buy cialis online usa paypal

Anonymous said...

cialis online generic cialis cipla - buy cialis new delhi

Anonymous said...

learn how to buy tramdadol tramadol no prescription free shipping - 100mg of tramadol erowid

Anonymous said...

buy klonopin online klonopin cause high blood pressure - klonopin rxlist

Anonymous said...

learn how to buy tramdadol tramadol hcl side effects humans - tramadol de 50 mg para que sirve

Anonymous said...

http://www.integrativeonc.org/adminsio/buyklonopinonline/#cheap buy klonopin no prescription - long does 2mg klonopin stay system

Anonymous said...

buy tramadol usa purchase tramadol for dogs - tramadol online no prescription mastercard

Anonymous said...

My feet hаve haгԁly anу notion, but getting tantric massagе done used fоr
ԁifferent tуpes оf mаѕsаge.
Thе ѕupra Gayatri mаntгa iѕ but уou cаn buy onе fοr less than
$25.

Fеel free to surf to my web-ѕitе:
try this site for sensual massage london

Anonymous said...

http://www.integrativeonc.org/adminsio/buyklonopinonline/#buy klonopin 2mg for sleep - high tolerance klonopin

Anonymous said...

buy carisoprodol online no prescription carisoprodol 350 mg tablet - buy soma carisoprodol online

Anonymous said...

thunderbird emblem dating http://loveepicentre.com/ reviews of ge dating services
who is j-boog dating [url=http://loveepicentre.com/taketour/]100 free wife dating[/url] dating norway 2008
dating website comparison [url=http://loveepicentre.com/articles/]dating ideas for teenagers[/url] free phone sex chat lines dating [url=http://loveepicentre.com/user/fumaan/]fumaan[/url] dating in buffalo ny