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

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
 
G

GrantMagic

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);
 
S

SevDer

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);
 
J

Jinsong Liu

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top