Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email from VFP inhouse through exchange
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00298566
Message ID:
00298602
Views:
11
>I downloaded one of the files here for emailing by Matt McDonnell.
>
>I am not getting the SEND to activate. I think that it's a Outlook 97 & Exchange issue.
>
>Here is a call that bombs :
>My_Obj.Send
>
>In Matt's program there were param's passed in this call.
>
>Any ideas?
>
>__Stephen

Look at using Rick Strahl's wwipstuff. It's not nearly as heavy and it will even let you put in bogus return addresses, etc. Here's some of his sample code that I've modified somewhat with explanations:
* From Rick Strahl's examples in wwipstuff, with a few modifications.
* Download WWIPSTUFF from www.west-wind.com

SET PROCEDURE TO wwUtils ADDITIVE
SET CLASSLIB TO wwIPStuff ADDITIVE

CLEAR
o=CREATE("wwIPStuff")
SET MEMOWIDTH TO 200
*** Sending SMTP Mail
* YOU NEED TO KNOW THE GATEWAY FOR YOUR EMAIL ACCOUNT. THE FOLLOWING IS FOR 
* MY WEBSERVER
o.cMailServer="mail.shelbynet.com"
o.cSenderEmail="john.harvey@shelbynet.com"
o.cSenderName="This Would Also Be You"
* IF SENDING TO MULTIPLES OPEN A TABLE AND SCAN THROUGH, OTHERWISE SEND ONE
*scan
* THIS IS GETTING THE EMAIL ADDRESS FROM THE EMAIL FIELD IN A TABLE.  
* YOU COULD ALSO JUST HARD CODE THE EMAIL ADDRESS
	o.cRecipient=allt(email)
*   THE CARBON COPY LIST (254 CHAR LIMIT - I think)
*	o.cCCList="rstrahl@xwest-wind.com,looser@nobody.com"
*   THE BLIND CARBON COPY LIST (254 CHAR LIMIT - I think)
*	o.cBCCList="rstrahl@west-wind.com"
	o.cSubject='Test' 
* THE TABLE HAS A MEMO FIELD (NOTE)
	o.cMessage='This is the body text, which could be anything'
*	o.cMessage=MESSAGE.NOTE
* SEND AN ATTACHMENT
	o.cAttachment="e:\vfplibrary\web\strahl\sendmail.prg"
llResult =  o.SendMailAsync()    && Send message and return immediately w/o result
*!*		llResult = o.SendMail()       && Send again - wait for completion
	IF !llResult
	   Wait window o.cErrorMsg
	ELSE
	   Wait window nowait "Message sent..."
	ENDIF
*ENDscan
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