Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending mail through lotus notes
Message
From
21/04/2010 14:11:40
Aldrich Arendsz
Gamma Research Inc.
Aruba
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Sending mail through lotus notes
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01461371
Message ID:
01461371
Views:
125
Hi All,

I'm trying to send emails with attachment through lotus notes by using MAPI to access lotus notes.
The lotus notes client is setup to work as a simple mail client by using POP3 and SMTP to receive/send
emails which works fine in the client app.

I got the code so far that the mail is being composed and the attachement attached to the mail, however
it doesn't send the e-mail automatically.

The code I use is as follows:
LOCAL loSession, loMessage
*
loSession = CREATEOBJECT("MSMapi.MapiSession")
loMessage = CREATEOBJECT("MSMapi.MapiMessages")
*
loSession.LogonUI = .T.
loSession.DownLoadMail = .F.
loSession.SignOn()
*
loMessage.SessionID = loSession.SessionID
loMessage.MsgIndex = -1
*
loMessage.Compose()
loMessage.RecipDisplayName = "Aldrich"
loMessage.RecipAddress = "aarendsz@hotmail.com"
loMessage.MsgSubject = "Test5a"
loMessage.MsgNoteText = "Dies ist ein test"
lomessage.AttachmentIndex = 0
loMessage.AttachmentPathName = "c:\setup.log"
*
loMessage.Send(0)

Is there something missing in this code that it is not sending the e-mail automatically?

Thanks in advance for the help.
Next
Reply
Map
View

Click here to load this message in the networking platform