Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send Mail with CDO
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Firebird
Miscellaneous
Thread ID:
01135873
Message ID:
01136072
Views:
11
>Go to Control Panel, Add or Remove Components, Click on Add/Remove Windows Components, see if IIS is installed (highlight IIS and click on the Details button), if not, install it, then install SMTP. If IIS is installed, then highlight it and click on the Details button to see if SMTP Service is also installed (checked).
>
>To install it:
>
>http://www.codeproject.com/Purgatory/ConfigServerSmtp.asp
>


Tracy,

I seemed to remember having stolen someone's code for this before. Here it is and I'm sorry I can't remember who I stole it from, but if it was a lurker, feel free to take the credit.
iMsg = Createobject("CDO.Message")
iConf = Createobject("CDO.Configuration")
Flds = iConf.Fields
With Flds
	.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
	.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 'mail.shelbynet.com'
	.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
	.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "yourusernam"
	.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpassword"
	.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = .F.
	.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
	.Update
Endwith
With iMsg
	.Configuration = iConf
	.To = "youremailaddress@someplace.com"
	.CC = ""
	.BCC = ""
	.From = "me@somewhere.com"
	.Subject = "Test is a test"
	.TextBody = "The body of the message"
	.Send()
Endwith
iMsg = .Null.
iConf = .Null.
It works for me and you don't get that dang outlook nag screen.

John
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform