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:

  1. 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.

    ReplyDelete
  2. ...please where can I buy a unicorn?

    ReplyDelete
  3. 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

    ReplyDelete
  4. 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

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

    ReplyDelete
  6. 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

    ReplyDelete
  7. 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 ...

    ReplyDelete
  8. 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]

    ReplyDelete
  9. 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

    ReplyDelete
  10. 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

    ReplyDelete
  11. I do not understand

    ReplyDelete
  12. 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 ...

    ReplyDelete
  13. 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.

    ReplyDelete
  14. 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.

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

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

    ReplyDelete
  17. [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

    ReplyDelete
  18. viagra for sale viagra no prescription - best rated online pharmacy viagra

    ReplyDelete
  19. generic viagra online buy viagra 50mg online - viagra online fast delivery

    ReplyDelete
  20. viagra online without prescription buy viagra paypal accepted - cheap viagra to buy online

    ReplyDelete
  21. viagra price viagra dosage duration - highest quality generic viagra

    ReplyDelete
  22. generic viagra order generic viagra online us - cialis vs viagra buy online

    ReplyDelete
  23. [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

    ReplyDelete
  24. buy soma 350mg buy soma online in florida - soma online overnight delivery

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

    ReplyDelete


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

    ReplyDelete
  27. order soma deadly soma online movie - order soma ship texas

    ReplyDelete
  28. buy cialis online cialis 10 mg price - cialis $0.92

    ReplyDelete
  29. buy soma online soma puzzle - buy soma 350 mg online

    ReplyDelete
  30. buy soma soma san diego tumblr - online soma

    ReplyDelete
  31. buy tramadol tramadol withdrawal symptoms and duration - help buy tramadol

    ReplyDelete
  32. buy cialis online buy cialis mexico - cialis coupon voucher

    ReplyDelete
  33. buy xanax valium online florida xanax generic pink - drug test with xanax

    ReplyDelete
  34. alprazolam mg xanax overdose milligrams - can xanax overdose kill you

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

    ReplyDelete
  36. buy carisoprodol many carisoprodol 350 mg get high - erowid carisoprodol 350 mg

    ReplyDelete
  37. tramadol no prescription tramadol withdrawal symptoms how long - buy tramadol 6914

    ReplyDelete
  38. generic xanax 3mg xanax and alcohol - kind drug xanax

    ReplyDelete
  39. buy tramadol tramadol for dogs uses - tramadol hcl

    ReplyDelete
  40. xanax online xanax dosage by color - drug interactions xanax vicodin

    ReplyDelete
  41. buy cialis online generic cialis tadalafil - generic cialis line

    ReplyDelete
  42. buy cialis online cheap cialis levitra - buy cialis online usa paypal

    ReplyDelete
  43. cialis online generic cialis cipla - buy cialis new delhi

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

    ReplyDelete
  45. buy klonopin online klonopin cause high blood pressure - klonopin rxlist

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

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

    ReplyDelete
  48. buy tramadol usa purchase tramadol for dogs - tramadol online no prescription mastercard

    ReplyDelete
  49. 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

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

    ReplyDelete
  51. buy carisoprodol online no prescription carisoprodol 350 mg tablet - buy soma carisoprodol online

    ReplyDelete
  52. 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

    ReplyDelete