I don't remember the exact exception but the solution is to use the Fields property of SmtpMail:
Set sendusing and postusing to 'pickup'.
Set smtpserverpickupdirectory and nntpserverpickupdirectory, typically to "C:\InetPub\mailroot\Pickup".
Set flushbuffersonwrite to True (not strictly necessary I don't think)
Here's my theory of how this came about.
1. Under Classic ASP, CDO.Message defaults to the above settings.
2. SmtpMail under the 1.0 Framework did not allow access to the Fields collection, so MS kept the same default settings for the wrapped CDO Message object.
3. SmtpMail under the 1.1 Framework does allow access to the Fields collection, so MS decided the defaults weren't appropriate now that users had access to the fields collection.
Unfortunately they apparently didn't document any of this, so unless you're already familiar with CDO beyond just taking the defaults under Classic ASP and then the SmtpMail defaults under the 1.0 framework, then you're pretty much clueless as to what's going on under 1.1. I didn't even know the fields collection existed. When you go to the 1.1 Framework MSDN documentation for SmtpMail.Fields you find 'to be defined'.
Regards,
Richard Waddell
|