Hello All,
I am trying to send mails with attachement using MAPI. Everything works fine except that from time to time I get this error on the SEND method:
32002: Unspecified failure has occured
It looks like the attachement part is having a problem.. coz when i put tht part in comment it works propely..
here is my code :
is anyone thr to help me out with this.
thank u very much
I am trying to send mails with attachement using MAPI. Everything works fine except that from time to time I get this error on the SEND method:
32002: Unspecified failure has occured
It looks like the attachement part is having a problem.. coz when i put tht part in comment it works propely..
here is my code :
Code:
Private Sub CmdReminder_Click()
Const SESSION_SIGNON = 1
Const MESSAGE_COMPOSE = 6
Const ATTACHTYPE_DATA = 0
Const RECIPTYPE_TO = 1
Const RECIPTYPE_CC = 2
Const MESSAGE_RESOLVENAME = 13
Const MESSAGE_SEND = 3
Const SESSION_SIGNOFF = 2
MAPISession1.Action = SESSION_SIGNON
MAPIMessages1.SessionID =
MAPISession1.SessionID
MAPIMessages1.Action = MESSAGE_COMPOSE
MAPIMessages1.MsgSubject = "Reminder"
MAPIMessages1.MsgNoteText = "This is just a Reminder."
[B]MAPIMessages1.AttachmentPosition = 0
MAPIMessages1.AttachmentType = ATTACHTYPE_DATA
MAPIMessages1.AttachmentName = "name"
MAPIMessages1.AttachmentPathName = "c:\config.sys"[/B]
MAPIMessages1.RecipIndex = 0
MAPIMessages1.RecipType = RECIPTYPE_TO
MAPIMessages1.RecipDisplayName = "email name"
MAPIMessages1.RecipIndex = 1
MAPIMessages1.RecipType = RECIPTYPE_TO
MAPIMessages1.RecipDisplayName = "email name"
MAPIMessages1.RecipIndex = 2
MAPIMessages1.RecipType = RECIPTYPE_CC
MAPIMessages1.RecipDisplayName = "email name"
MAPIMessages1.RecipIndex = 3
MAPIMessages1.RecipType = RECIPTYPE_CC
MAPIMessages1.RecipDisplayName = "email name"
MAPIMessages1.Action = MESSAGE_RESOLVENAME
[B]MAPIMessages1.Action = MESSAGE_SEND[/B]
MAPISession1.Action = SESSION_SIGNOFF
End Sub
thank u very much
Comment