Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exchange server
Message
From
04/04/2001 21:13:25
 
 
To
04/04/2001 18:12:49
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00487127
Message ID:
00492173
Views:
16
Dragan,

>The problem is that it is using my Outlook, and when I try to send email programmatically (attempting with wwipstuff.sendmapimail) it launches a nasty little dialogue from Outlook ...

Don't use SendMapiMail. Instead use either SendMail, which waits for the process to complete; or SendMailAsync, which starts another process and returns immediately to your program.

Either of those requires setting a few properties on the wwIPStuff object. Here is slightly doctored sample code from the help file (UT wanted to turn the sample email addresses into links):
o=CREATEOBJECT('wwIPStuff')

o.cMailServer='mail.yourmailserver.net'
o.cSenderEmail='YourEmailAddress'
o.cSenderName='Rick Strahl'

o.cRecipient='RecipientAddress,AnotherRecipientAddress'
o.cCCList='ccAddressList'
o.cBCCList='fred @ flintstone.com'  && of course, take out the spaces
o.cSubject='wwIPStuff Test Message'
o.cMessage='Who said this had to be difficult?'
o.cAttachment='c:\config.sys,c:\utl\hex.exe'

*** Optionally send HTML formatted messages
*** if your content is HTML
* o.cContentType='text/html'

*** Send and don't wait for completion
*? o.SendMailAsync()   

*** Send again - wait for completion
llResult = o.SendMail()       
IF !llResult
   Wait window o.cErrorMsg
ENDIF
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform