How can I send email from .Net using Exchange 5.5 ?

  • Thread starter Thread starter Michal
  • Start date Start date
M

Michal

Hi
I need to connect to Exchange 5.5 from .Net Web Application and send email
using user profile.

I did it two years ago on ASP but now I have to migrate it to .Net.
I can not find any solutions in msdn to resolve it.

Any idea how I can do this ?

Michal
 
Michal said:
Hi
I need to connect to Exchange 5.5 from .Net Web Application and send email
using user profile.

I did it two years ago on ASP but now I have to migrate it to .Net.
I can not find any solutions in msdn to resolve it.

Any idea how I can do this ?

Michal

is this what you looking for:

MailMessage msgMail = new MailMessage();
msgMail.To = "(e-mail address removed)";
msgMail.From = "(e-mail address removed)";
msgMail.Subject = "Mail Example Subject";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "MAIL EXAMPLE BODY";
msgMail.Body = strBody;
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);
 
What happens, if your exchange server doesn't accept rely and it is
outside the network?
How do you send user/pass to the server to authendicate you.
Hi
I need to connect to Exchange 5.5 from .Net Web Application and send email
using user profile.

I did it two years ago on ASP but now I have to migrate it to .Net.
I can not find any solutions in msdn to resolve it.

Any idea how I can do this ?

Michal

is this what you looking for:

MailMessage msgMail = new MailMessage();
msgMail.To = "(e-mail address removed)";
msgMail.From = "(e-mail address removed)";
msgMail.Subject = "Mail Example Subject";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "MAIL EXAMPLE BODY";
msgMail.Body = strBody;
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);
 
If you are using .NET 1.1, you could use MailMessage.Fields property
to send authentication information


oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"2")

oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"username")

oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"password")

Jinsong

What happens, if your exchange server doesn't accept rely and it is
outside the network?
How do you send user/pass to the server to authendicate you.
Hi
I need to connect to Exchange 5.5 from .Net Web Application and send email
using user profile.

I did it two years ago on ASP but now I have to migrate it to .Net.
I can not find any solutions in msdn to resolve it.

Any idea how I can do this ?

Michal

is this what you looking for:

MailMessage msgMail = new MailMessage();
msgMail.To = "(e-mail address removed)";
msgMail.From = "(e-mail address removed)";
msgMail.Subject = "Mail Example Subject";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "MAIL EXAMPLE BODY";
msgMail.Body = strBody;
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);
 
Back
Top