Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Email Using MAPI (Visual Basic 5)

Status
Not open for further replies.

thehead

Technical User
Jan 10, 2002
13
GB
Hi,

I run the following program and I get an error saying Run time error: 32026
Not supported

On the MESSAGE_SEND line, any idea what I am doing wrong?

Tom

Sub Timer()

SignOffMAPI
SignOnMAPI
ComposeSMSMessage
SendSMSMessage
SignOffMAPI

End Sub

Sub SignOnMAPI()

frmAutoemail.MAPISession.NewSession = True
frmAutoemail.MAPISession.SignOn

'Open up a MAPI session:
frmAutoemail.MAPISession.UserName = "tom webb"
frmAutoemail.MAPISession.NewSession = True
frmAutoemail.MAPISession.LogonUI = False

' SendKeys automailpass & "~" 'automail
' frmAutoemail.MAPISession.Action = SESSION_SIGNON

'Point the MAPI messages control to the open MAPI session:
frmAutoemail.MAPIMessages.SessionID = frmAutoemail.MAPISession.SessionID

End Sub

Sub ComposeSMSMessage()

frmAutoemail.MAPIMessages.Action = MESSAGE_COMPOSE
frmAutoemail.MAPIMessages.MsgSubject = "Automatic Mail Message"
frmAutoemail.MAPIMessages.MsgNoteText = "Automatic Mail Message From Bull Helpdesk"
frmAutoemail.MAPIMessages.RecipIndex = 0 'First recipient
frmAutoemail.MAPIMessages.RecipType = RECIPTYPE_TO 'Recipient in TO line
frmAutoemail.MAPIMessages.RecipAddress = "Webbsoft@hotmail.com" 'e-mail name

End Sub

Sub SendSMSMessage()

'Send the message:
frmAutoemail.MAPIMessages.Action = MESSAGE_SEND

End Sub

Sub SignOffMAPI()

'Close MAPI mail session:
frmAutoemail.MAPISession.Action = SESSION_SIGNOFF

End Sub Webmaster of The EPICentre and owner of Minatures Online. (10% off all VOID goods!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top