sending mail

  • Thread starter Thread starter Guest
  • Start date Start date
I have an example using the default email client on my web site if this is
any help to you.

using System.Diagnostics;

string toEmail = "(e-mail address removed)";
string subject = "Love the Program";
string body = "Thanks a lot";
string message = string.Format( "mailto:{0}?subject={1}&body={2}", toEmail,
subject, body );

Process.Start( message );

Example app can be found at
http://www.publicjoe.f9.co.uk/csharp/snip/snip007.html

Hope this helps

Publicjoe
C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html
 
But this way the is not sent. It just open the mail editor with the correct
data, but the user still need to to do the sending.

How can I to the sending by C# code without bothering the user?


Thanks
Sharon
 
Yes, I know the System.Web.Mail.SmtpMail and I'm using it.
But it require using a specific mail server that require authentication,
that require user name and password that can be easily seen by looking in the
assembly, so it require encrypting the user name name and password etc.

This is why I wish to send the mail using the current default email client.

How can that be done?
 
Well your last post contained the statement

//
This is why I wish to send the mail using the current default email
client.
\\

To do that you use MAPI, to avoid the user intervention in MAPI you
will have change the security settings on the users machine.

Now, to use authenticateion with SmtpMail check out this page:
http://www.systemwebmail.com/faq/3.8.aspx

It is really very simple, and simple typing "SmtpMail Authenticate"
(without the quotes) into Google brings up many
discussions/articles/examples on the subject.


HTH
BW
 
Back
Top