L
Lin
Hello,
I am new to c#, please help.
I am writing an application, which will be able to send email
automatically, for a very large organisation. The application I am
writing should be on the central server, anyone within the organisation
should be able to download the application and run on his/her local
machine without any configuration. The organisation may have quite a
few email servers, so we cannot user server side email API to send
email because this will involve to cofigure the application for
different email server. I plan to use the user's default email client
to send email. If I use mailto protocol in my application, for example,
mailto:?subject=mysubject&body=myemailbody&attachment=somefile.txt,
it seems that the size of text can be put in the email body is very
limited and the attachment attribute doesn't work for all email
client. So I am thinking to use the Process
1) open the client email application
2) get the client email application handle
3) get the input/output stream of the client email application using
the handle
4) write to the client email body
I can only get the first 2 steps done as the following:
Process myPro = new Process();
myPro.FileName = mailto:myemail@somewhere?subject=hello;
myPro.Start();
Handle myHandle = myPro.Handle;
Please give me some advice on how to do this and are there any better
way to do this?
Thanks in advance.
Lin
I am new to c#, please help.
I am writing an application, which will be able to send email
automatically, for a very large organisation. The application I am
writing should be on the central server, anyone within the organisation
should be able to download the application and run on his/her local
machine without any configuration. The organisation may have quite a
few email servers, so we cannot user server side email API to send
email because this will involve to cofigure the application for
different email server. I plan to use the user's default email client
to send email. If I use mailto protocol in my application, for example,
mailto:?subject=mysubject&body=myemailbody&attachment=somefile.txt,
it seems that the size of text can be put in the email body is very
limited and the attachment attribute doesn't work for all email
client. So I am thinking to use the Process
1) open the client email application
2) get the client email application handle
3) get the input/output stream of the client email application using
the handle
4) write to the client email body
I can only get the first 2 steps done as the following:
Process myPro = new Process();
myPro.FileName = mailto:myemail@somewhere?subject=hello;
myPro.Start();
Handle myHandle = myPro.Handle;
Please give me some advice on how to do this and are there any better
way to do this?
Thanks in advance.
Lin