Click here to Skip to main content
15,914,163 members
Home / Discussions / C#
   

C#

 
GeneralRe: Running an app on windows startup Pin
Nick Parker24-Jan-05 6:10
protectorNick Parker24-Jan-05 6:10 
GeneralRe: Running an app on windows startup Pin
mikey_g24-Jan-05 6:29
mikey_g24-Jan-05 6:29 
GeneralRe: Running an app on windows startup Pin
mikey_g24-Jan-05 6:42
mikey_g24-Jan-05 6:42 
GeneralRe: Running an app on windows startup Pin
mikey_g25-Jan-05 0:37
mikey_g25-Jan-05 0:37 
QuestionServices and MAPI? Pin
Esmo200024-Jan-05 4:16
Esmo200024-Jan-05 4:16 
AnswerRe: Services and MAPI? Pin
Corinna John24-Jan-05 5:00
Corinna John24-Jan-05 5:00 
GeneralRe: Services and MAPI? Pin
Esmo200024-Jan-05 5:42
Esmo200024-Jan-05 5:42 
GeneralRe: Services and MAPI? Pin
Corinna John24-Jan-05 6:18
Corinna John24-Jan-05 6:18 
There are two possible combinations for Logon.

1. Use this one, if there is a profile configured locally for the account
session.Logon(name, password, false, true, 0, false, Missing.Value);

2. Use this one for a dynamic profile, if there is no local Outlook profile configured for this account:
session.Logon(Missing.Value, Missing.Value, false, true, 0, false, "serverName\raccountName");

The second call takes only server name and account name. It uses the service's current impersonation for authentication, so the service have to run with the mailbox owner's account (or impersonate it before logon, and undo impersonation after logon).

I don't know of any workaround for the MTA issue, but CDO works alright, if you don't use .NET remoting. You could open a socket and wait for requests from the client application. Serialize the mail content through the socket, and then send the mails.
You'll need the following classes:
- System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- System.Net.Sockets.Socket
- your own mail content structure

Client:
1. fill a mail content structure
2. open a client socket
3. serialize the mail content through the socket
4. wait for success response

Service:
1. open a server socket
2. listen for incoming connections
3. accept connection
4. deserialize mail content
5. send mail (CDO)
6. send response (socket)
7. back to 2.


_________________________________
Vote '1' if you're too lazy for a discussion

QuestionSTA Activex Controls and AppDomains? Pin
Dr Herbie24-Jan-05 4:05
Dr Herbie24-Jan-05 4:05 
GeneralMenu Problem inC# Pin
itssuk24-Jan-05 2:11
itssuk24-Jan-05 2:11 
Generaldraggable app. Pin
Pyro Joe24-Jan-05 1:29
Pyro Joe24-Jan-05 1:29 
GeneralRe: draggable app. Pin
Christian Graus24-Jan-05 9:04
protectorChristian Graus24-Jan-05 9:04 
GeneralRe: draggable app. Pin
Andy Brummer24-Jan-05 9:13
sitebuilderAndy Brummer24-Jan-05 9:13 
Generalhtml color coding Pin
Pyro Joe24-Jan-05 1:26
Pyro Joe24-Jan-05 1:26 
GeneralRe: html color coding Pin
Nick Parker24-Jan-05 6:17
protectorNick Parker24-Jan-05 6:17 
GeneralRe: html color coding Pin
Richard Schneider26-Jan-05 1:27
Richard Schneider26-Jan-05 1:27 
GeneralRe: html color coding Pin
Nick Parker26-Jan-05 4:16
protectorNick Parker26-Jan-05 4:16 
Generalerror in casting hashtable Pin
rathishps24-Jan-05 0:45
rathishps24-Jan-05 0:45 
GeneralRe: error in casting hashtable Pin
Corinna John24-Jan-05 6:24
Corinna John24-Jan-05 6:24 
GeneralRe: error in casting hashtable Pin
rathishps31-Jan-05 18:05
rathishps31-Jan-05 18:05 
Generaluser32.dll Pin
realmontanakid24-Jan-05 0:17
realmontanakid24-Jan-05 0:17 
GeneralRe: user32.dll Pin
Stefan Troschuetz24-Jan-05 1:11
Stefan Troschuetz24-Jan-05 1:11 
GeneralRe: user32.dll Pin
mav.northwind24-Jan-05 3:09
mav.northwind24-Jan-05 3:09 
GeneralRe: user32.dll Pin
Stefan Troschuetz24-Jan-05 3:30
Stefan Troschuetz24-Jan-05 3:30 
GeneralRe: user32.dll Pin
Dave Kreskowiak24-Jan-05 4:15
mveDave Kreskowiak24-Jan-05 4:15 

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.