Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Setup / December 2004

Tip: Looking for answers? Try searching our database.

Problem to send email with recipient address ( MAPI in VFP8)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mario - 16 Dec 2004 19:23 GMT
The only part of my program that  NOT work is the recipient address, the
error message is the follow:

OLE Idispatch execution code 0 from MAPI Messages;
Unspecified Failure has ocurred.

See my program code:

* Create an instance of a form, and then add the MSMAPI.MAPISession and
  * MSMAPI.MAPIMessages OLE controls to that form:

  oform = CreateObject("form")
  oform.addobject("Session1","olecontrol","MSMAPI.mapiSession")
  oform.addobject("Message1","olecontrol","MSMAPI.mapiMessages")

  * Call the Signon method of the MAPISession control. If the user is not
  * logged into mail, this will prompt the user to sign on. This also sets
  * the SessionId property for the MAPIsession control:

  oform.Session1.signon

  * Set the SessionId of the MAPIMessage control to the SessionId of the
  * MAPISession control, which was just obtained:

  oform.Message1.sessionid = oform.Session1.sessionid

  * Compose an e-mail message and set the subject line and Message text:

  oform.Message1.compose
 

 
**** SEE !   This line not work, this is the problem
  *oform.Message1.RecipAddress = "mlopez@prcomputer2.net"
*****

 
  oform.Message1.msgsubject = "Memo from my FoxPro app"
  oform.Message1.msgnotetext = "This works"
  oform.Message1.AttachmentPathName = "c:\pdf_invest_proc\04-00100.pdf"
 
   
     
  * Sends the e-mail message. The (1) is required to send the message.

  oform.Message1.send(1)
 
  * Optionally, release the objects if they are no longer needed:

  release oform
 
  RETURN

Signature

Mario

Lee Mitchell - 16 Dec 2004 22:01 GMT
Hi Mario:

Before calling the line 'oform.Message1.RecipAddress ="
mlopez@prcomputer2.net,"'
make sure you have populated the RecipDisplayName property with a non-null
value. For example:
oform.Message1.RecipDisplayName = "Mario Lopez"

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/   

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
  http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
  http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
  - VFP5 Mainstream Support retired June 30th, 2003
  - VFP6 Mainstream Support retired Sept. 30th, 2003

>The only part of my program that  NOT work is the recipient address, the
>error message is the follow:

>OLE Idispatch execution code 0 from MAPI Messages;
>Unspecified Failure has ocurred.

>See my program code:

>* Create an instance of a form, and then add the MSMAPI.MAPISession and
>   * MSMAPI.MAPIMessages OLE controls to that form:

>   oform = CreateObject("form")
>   oform.addobject("Session1","olecontrol","MSMAPI.mapiSession")
 > oform.addobject("Message1","olecontrol","MSMAPI.mapiMessages")

>  * Call the Signon method of the MAPISession control. If the user is not
>  * logged into mail, this will prompt the user to sign on. This also sets
 > * the SessionId property for the MAPIsession control:

>  oform.Session1.signon

>  * Set the SessionId of the MAPIMessage control to the SessionId of the
 > * MAPISession control, which was just obtained:

 > oform.Message1.sessionid = oform.Session1.sessionid

  >* Compose an e-mail message and set the subject line and Message text:

  >oform.Message1.compose
 

 
>**** SEE !   This line not work, this is the problem
>   *oform.Message1.RecipAddress = "mlopez@prcomputer2.net"
>*****

 
>   oform.Message1.msgsubject = "Memo from my FoxPro app"
>   oform.Message1.msgnotetext = "This works"
>   oform.Message1.AttachmentPathName = "c:\pdf_invest_proc\04-00100.pdf"
 
   
     
>   * Sends the e-mail message. The (1) is required to send the message.

>   oform.Message1.send(1)
 
>   * Optionally, release the objects if they are no longer needed:

>   release oform
 
>   RETURN
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.