Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email
Message
 
To
12/11/2002 21:53:56
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Email
Miscellaneous
Thread ID:
00721961
Message ID:
00722020
Views:
56
CDOSYS comes with the Win2k and the XP OS (CDONTS is included with NT). Here's SMTP from VFP using CDOSYS:
#DEFINE cdoSendUsingPort 2
#DEFINE smtpserverport 25
#DEFINE smtpserver 'fireball.dotcomsolution.com'

LOCAL loMsg
loMsg = NEWOBJECT("CDO.Message")

WITH loMsg
   .FROM = "cfuchs@activevfp.com"
   .TO = "cfuchs@activevfp.com"
   .BCC = ""
   .Subject = "This is the subject line"
   .TextBody = "This is the body of the message"
   .Configuration.FIELDS("http://schemas.microsoft.com/cdo/configuration/sendusing").VALUE = cdoSendUsingPort
   .Configuration.FIELDS("http://schemas.microsoft.com/cdo/configuration/smtpserver").VALUE = smtpserver
   .Configuration.FIELDS("http://schemas.microsoft.com/cdo/configuration/smtpserverport").VALUE = smtpserverport
   .Configuration.FIELDS.UPDATE
   .SEND
ENDWITH
loMsg = NULL
MESSAGEBOX("Mail sent")
>Hi Everyone,
>
>I need some code for sending out emails to 1 or more addresses to include a subject line and fill in the content field automatically. it needs to look something like:
>
>TO: robnixon9@hotmail.com
>
>CC: joebloggs@
>
>SUBJECT: Meeting on 21st
>
>CONTACT: You are invited to a meeting in Room 12 etc etc
>
>
>I would also be able to attach a document automatically, but that's not too important at this stage.
>
>Is there any standard code available. I had a look at the ActiveX control, but could not work out how to use it.
>
>Cheers
>Rob
Previous
Reply
Map
View

Click here to load this message in the networking platform