Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Darren Ward
  Where is Darren Ward?
 Dorset
 United Kingdom
 Darren Ward
 To: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 Tags
Subject: RE: MAPI
Thread ID: 78739 Message ID: 78747 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Friday, October 07, 2005 3:42:51 PM         
   


Hiya Mike,

Thanks for the reply. I cut and pasted your code straight in as is and the ne email pops up but the body of the email is blank. I can populate the from, to, subject but the body of the email is now blank.

I am running VFP 9, XP and Outlook 2003. I have tried it on about 10 different PC's on the network and it is doing the same on all of them, just can't explain it, but has only been since OL 2003.

Yet if I;

LOCAL loSession AS "mapi.session", ;
loMessage AS OBJECT, ;
loRecip AS OBJECT, ;
loSentItems AS OBJECT, ;
loSentMsg AS OBJECT, ;
lcToWho AS STRING, ;
lcSampleAddress AS STRING, ;
lcNewSentFolderID AS STRING, ;
loMsgCopy AS OBJECT

lcToWho = "DWard"
loSession = CREATEOBJECT("mapi.session")
loSession.Logon()
loMessage = loSession.Outbox.MESSAGES.ADD

WITH loMessage
.Subject = "Test Message"
.TEXT = "Test Body"
loRecip = .Recipients.ADD
loRecip.NAME = ALLTRIM(lcToWho)
loRecip.Resolve
.UPDATE()
.SEND(.T.)
ENDWITH
loSession.Logoff

It sends the mail with the body text in there but you get all the annoying security warnings and I want to allow the user to check and amend the email content if required prior to sending.

Stumped.

ENTIRE THREAD

MAPI Posted by Darren Ward @ 10/7/2005 12:38:26 PM
RE: MAPI Posted by Mike Gagnon @ 10/7/2005 2:37:56 PM
RE: MAPI Posted by Darren Ward @ 10/7/2005 3:42:51 PM
RE: MAPI Posted by Darren Ward @ 10/7/2005 4:02:56 PM
RE: MAPI Posted by Mike Gagnon @ 10/7/2005 4:39:11 PM
RE: MAPI Posted by Darren Ward @ 10/7/2005 4:57:16 PM
RE: MAPI Posted by Mike Gagnon @ 10/7/2005 5:11:49 PM