Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sendmail
Message
From
01/07/2002 21:42:02
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00673911
Message ID:
00674232
Views:
24
This is NT4? If IIS is installed, the SMTP service can be installed as an option. Once the SMTP service is installed and properly configured (probably setting the "Smart Host" property to point to the server that normally handles SMTP mail on your network), you can send mail with three lines of code:
oSMTP = CREATEOBJECT("cdonts.NewMail")
oSMTP.Send("Reply_addr@domain.com", "Recipient_Addr@domain.com", ;
     "This is the subject!", ;
     "This is the body of the message.", ;
     1)
RELEASE oSMTP
The last parameter is the Importance. 0=Low, 1=Norm, 2=High.

At least, this works fine on the NT4 server in my office. :) If you upgrade the server to Win2K or later, I believe you'll have to switch to using CDOSYS instead of CDONTS, and the object models are somewhat different.

There's lots of info on CDONTS up on http://msdn.microsoft.com/library/default.asp

-Tom


[Disclaimer: This post is provided "AS-IS" with no warranties, and convers no rights.]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform