Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exchange server
Message
De
04/04/2001 21:13:25
 
 
À
04/04/2001 18:12:49
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00487127
Message ID:
00492173
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform