Click here to Skip to main content
16,005,162 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Object Libraries in Outlook Pin
Cliff Wellman22-Nov-03 18:40
Cliff Wellman22-Nov-03 18:40 
GeneralSending attachments using MAPI and outlook security alert message. Pin
alexander13221-Nov-03 4:33
alexander13221-Nov-03 4:33 
GeneralRe: Sending attachments using MAPI and outlook security alert message. Pin
Dave Kreskowiak21-Nov-03 7:45
mveDave Kreskowiak21-Nov-03 7:45 
GeneralCalling a Dialup connection Pin
FerryEngels21-Nov-03 4:27
FerryEngels21-Nov-03 4:27 
GeneralRe: Calling a Dialup connection Pin
Sisira Pushpakumara27-Nov-03 17:49
sussSisira Pushpakumara27-Nov-03 17:49 
QuestionHow to get URL in an ActiveX Pin
peteralarsen20-Nov-03 23:02
peteralarsen20-Nov-03 23:02 
GeneralConnect to a remote datbase Pin
pradipta20-Nov-03 21:34
pradipta20-Nov-03 21:34 
GeneralProblem while sending mail from Windows service using MSMAPI Pin
alexander13219-Nov-03 20:23
alexander13219-Nov-03 20:23 
Hi Friends,
when i call a MSMAPI object from a standalone exe in VB .NET, i am able to send a mail. But when i spawn this exe as a process from a windows service, i get an error message while signing on using the MAPI session SignOn() method. I tried using windows service logon as both local system and using my NT logon too. The error message thrown is

System.Runtime.InteropServices.COMException (0x800A7D1A): Not supported
at MSMAPI.MAPISessionClass.SignOn()
at ProcTryMail.tryMail.Pr_SendMail() in D:\Projects\Ems\Backup_Nov17OutSeq\ProcTryMail\tryMail.vb:line 20

My feeling was that some security access is required.

The code i have used is:

Public Class tryMail
Private objMapiSession As MSMAPI.MAPISession
Private objMapiMsgs As MSMAPI.MAPIMessages
Private i As Boolean
Public Sub Pr_SendMail()
Try

objMapiSession = New MSMAPI.MAPISession()
objMapiMsgs = New MSMAPI.MAPIMessages()
objMapiSession.SignOn()
objMapiMsgs.SessionID = objMapiSession.SessionID
objMapiMsgs.Compose()
objMapiMsgs.RecipDisplayName = "--give some mail id here--"
objMapiMsgs.MsgSubject = "From .NET MAPI"
objMapiMsgs.Send()
objMapiSession.SignOff()
Catch
End Try
End Sub
End class

Will be grateful if anyone of u is able to find out the problem.

Thanks
Alex
GeneralRe: Problem while sending mail from Windows service using MSMAPI Pin
Dave Kreskowiak20-Nov-03 9:56
mveDave Kreskowiak20-Nov-03 9:56 
GeneralRe: Problem while sending mail from Windows service using MSMAPI Pin
alexander13221-Nov-03 3:28
alexander13221-Nov-03 3:28 
QuestionHow to do this C# unsafe pointer passing in VB.NET Pin
the_warlord19-Nov-03 15:32
the_warlord19-Nov-03 15:32 
AnswerRe: How to do this C# unsafe pointer passing in VB.NET Pin
Dave Kreskowiak20-Nov-03 9:58
mveDave Kreskowiak20-Nov-03 9:58 
AnswerRe: How to do this C# unsafe pointer passing in VB.NET Pin
Dave Kreskowiak21-Nov-03 4:02
mveDave Kreskowiak21-Nov-03 4:02 
GeneralRe: How to do this C# unsafe pointer passing in VB.NET Pin
the_warlord21-Nov-03 12:24
the_warlord21-Nov-03 12:24 
GeneralRe: How to do this C# unsafe pointer passing in VB.NET Pin
Dave Kreskowiak24-Nov-03 4:19
mveDave Kreskowiak24-Nov-03 4:19 
GeneralDynamic function calls in VB Pin
Cliff Wellman19-Nov-03 10:21
Cliff Wellman19-Nov-03 10:21 
GeneralRe: Dynamic function calls in VB Pin
Michael P Butler19-Nov-03 12:54
Michael P Butler19-Nov-03 12:54 
GeneralRe: Dynamic function calls in VB Pin
MS le Roux19-Nov-03 18:30
MS le Roux19-Nov-03 18:30 
GeneralRe: Dynamic function calls in VB Pin
Dave Kreskowiak20-Nov-03 9:29
mveDave Kreskowiak20-Nov-03 9:29 
GeneralRe: Dynamic function calls in VB Pin
Cliff Wellman21-Nov-03 2:47
Cliff Wellman21-Nov-03 2:47 
Generalcalling myclass subs Pin
Anonymous19-Nov-03 10:10
Anonymous19-Nov-03 10:10 
GeneralRe: calling myclass subs Pin
Dave Kreskowiak20-Nov-03 9:08
mveDave Kreskowiak20-Nov-03 9:08 
General.NET Deployment Errors Pin
wmhhodson19-Nov-03 7:48
wmhhodson19-Nov-03 7:48 
GeneralRe: .NET Deployment Errors Pin
Dave Kreskowiak19-Nov-03 8:37
mveDave Kreskowiak19-Nov-03 8:37 
GeneralRe: .NET Deployment Errors Pin
wmhhodson19-Nov-03 9:10
wmhhodson19-Nov-03 9:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.