|
-
May 16th, 2001, 09:25 AM
#1
Thread Starter
Frenzied Member
SMTP via CDO for NTS
I know there have been several threads about this, and I've looked at some of them, but I'm wondering if anyone knows of a real example of a CDO for NTS implementation. It is easier for me to answer my specific questions by reverse engineering something then by sifting though an appropriately broad set of documentation.
I'm also wondering if anyone has had problems with the CDO for NTS under Win2K. I know there is a seperate release of the CDO for Windows 2000, but I want to build this around our minimum requirements (NT running IIS) and let people run it under Win2K if they want. I'd hate to have to build two versions of this ASP, one for NT and one for Win2K.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
May 16th, 2001, 04:24 PM
#2
Nothing too exciting here ... it was my first attempt at using CDONTS but it seems to work. I also have an example of sending an HTML formatted message (Rich Text), but this one is only plain text. Let me know if you want to see the other one as well.
Thanks!!!
Dan
Code:
'***************************************************
Rem Send email notification message
Set oSendMail = Server.CreateObject("CDONTS.NewMail")
Rem Prepare variables
oSendMail.To = "<a href="mailto:[email protected]</a>"
oSendMail.From = "<a href="mailto:[email protected]</a>"
oSendMail.Subject = "My Subject"
oSendMail.Body = "This is my test message!"
Rem Send message
oSendMail.Send
Rem Destroy object
Set oSendMail = Nothing
'****************************************************
-
May 16th, 2001, 04:27 PM
#3
Hmmm .. I didn't notice all the garbage at the end of the TO and FROM lines in my reply. Ignore all that stuff. The To and From properties should end with the end quotes.
Sorry ...
Dan
-
May 16th, 2001, 04:35 PM
#4
Thread Starter
Frenzied Member
What happens if I don't say Server.CreateObject and just say CreateObject? I've seen that both ways and I'm wondering.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
May 16th, 2001, 04:39 PM
#5
It's my understanding that Server.CreateObject specifies that the object will be created on the server. Since the workstations that access the web page probably won't have CDO available on them (it's part of the SMTP Service on an NT server I think), the code would probably fail. I could be wrong though. Then again, with the code in <% %> braces, it may default to creating the object on the server (ie. Server.CreateObject). Specifying it just makes it more clear to anyone supporting the code.
Dan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|