Hi all, I have a problem in sending out e-mail using MAPI. The message does go via Outlook Outbox folder and then Sent folder. However, it does not come to the recipient's e-mail address. Can anyone help me here please? The code is as shown below:
Private Sub Form_Load()
MAPISession1.DownLoadMail = False
MAPISession1.UserName = "my username"
MAPISession1.Password = "my password"
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
End Sub
Private Sub cmdPublish_Click()
MAPIMessages1.Compose
MAPIMessages1.MsgSubject = "Subject here"
MAPIMessages1.MsgNoteText = "Body message here"
MAPIMessages1.RecipDisplayName = "display name here"
MAPIMessages1.RecipAddress = "recipient's email address here"
MAPIMessages1.AttachmentPathName = "Attachment here" MAPIMessages1.Send
End Sub
Private Sub Form_Unload(Cancel As Integer)
MAPISession1.SignOff
End Sub
Is it because of the MAPIMessages1.RecipDisplayName or RecipAddress? I have included the recipient's email address under MAPIMessages1.RecipAddress only, and also tried to include "SMTP:"& but the result is the same, what is wrong here? Please help, thanks.
Regards,
Sandra
Private Sub Form_Load()
MAPISession1.DownLoadMail = False
MAPISession1.UserName = "my username"
MAPISession1.Password = "my password"
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
End Sub
Private Sub cmdPublish_Click()
MAPIMessages1.Compose
MAPIMessages1.MsgSubject = "Subject here"
MAPIMessages1.MsgNoteText = "Body message here"
MAPIMessages1.RecipDisplayName = "display name here"
MAPIMessages1.RecipAddress = "recipient's email address here"
MAPIMessages1.AttachmentPathName = "Attachment here" MAPIMessages1.Send
End Sub
Private Sub Form_Unload(Cancel As Integer)
MAPISession1.SignOff
End Sub
Is it because of the MAPIMessages1.RecipDisplayName or RecipAddress? I have included the recipient's email address under MAPIMessages1.RecipAddress only, and also tried to include "SMTP:"& but the result is the same, what is wrong here? Please help, thanks.
Regards,
Sandra