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
 Tags
Subject: Emails !!!!
Thread ID: 78977 Message ID: 78977 # Views: 7 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Tuesday, October 11, 2005 6:46:43 PM         
   


Thought this was solved but it keeps coming back.

Simple code;

LOCAL loSession, loMessages
loSession = CREATEOBJECT( "MSMAPI.MAPISession" )
loSession.Signon()
IF (loSession.SessionID > 0)
  loMessages = CREATEOBJECT( "MSMAPI.MAPIMessages" )
  loMessages.SessionID = loSession.SessionID
ENDIF

WITH loMessages
  .Compose()
  .RecipDisplayName = ALLTRIM(thisform.txtTo.Text)
  .RecipAddress = ALLTRIM(thisform.txtTo.Text)
  .RecipType = 1
*  .ResolveName()
  .MsgSubject = ALLTRIM(thisform.txtSubject.text)
  .MsgNoteText = thisform.Edit2.Text
  .SEND(.T.)
ENDWITH
loSession.Signoff()


Now, I don't want the .ResolveName() becuase you get that annoying 'something messing with your email address book' message, but if you don't use it the email bounces back because it's 'E-mail type' has been changed from SMTP to the email address !!!

And for some reason .RecipDisplayName and .RecipAddress appear to be working around the wrong way. If I only use .RecipDisplayName the email sends but in the sent box does not display a 'DisplayName' and if I only use a .RecipAddress I get an error when trying to '.SEND'

I hope this makes sense, because it doesnt to me, but this is only happening on external emails not emails within the organisation.

Am running VFP9, OL2003 SP1 and Exchange 2003

ENTIRE THREAD

Emails !!!! Posted by Darren Ward @ 10/11/2005 6:46:43 PM
RE: Emails !!!! Posted by Eric den Doop @ 10/11/2005 7:16:55 PM
RE: Emails !!!! Posted by Darren Ward @ 10/12/2005 9:57:12 AM