Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending mail through lotus notes
Message
De
21/04/2010 14:11:40
Aldrich Arendsz
Gamma Research Inc.
Aruba
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Sending mail through lotus notes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01461371
Message ID:
01461371
Vues:
124
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform