By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,742 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,742 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Michal" <ad*****@gazeta.pl> wrote in message
news:ch**********@nemesis.news.tpi.pl...
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 = "te**@address.com";
msgMail.From = "fr**@address.com";
msgMail.Subject = "Mail Example Subject";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "MAIL EXAMPLE BODY";
msgMail.Body = strBody;
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);
Nov 18 '05 #2

P: n/a
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.

GrantMagic wrote:
"Michal" <ad*****@gazeta.pl> wrote in message
news:ch**********@nemesis.news.tpi.pl...

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 = "te**@address.com";
msgMail.From = "fr**@address.com";
msgMail.Subject = "Mail Example Subject";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "MAIL EXAMPLE BODY";
msgMail.Body = strBody;
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);


--

SevDer
http://www.sevder.com
Nov 18 '05 #3

P: n/a
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

On Fri, 10 Sep 2004 13:28:35 -0400, SevDer <do****@sevder.com> wrote:
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.

GrantMagic wrote:
"Michal" <ad*****@gazeta.pl> wrote in message
news:ch**********@nemesis.news.tpi.pl...

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 = "te**@address.com";
msgMail.From = "fr**@address.com";
msgMail.Subject = "Mail Example Subject";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "MAIL EXAMPLE BODY";
msgMail.Body = strBody;
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);


Nov 18 '05 #4

P: n/a
Everything is working correct but I have another question ;)))

Do you know how can I put email into user Outbox in Exchange 5.5 ?

I tried to do this using MAPI (Interop.MAPI - Microsoft CDO 1.21 Library)
but I can't find example for this.
It is the same componenet which I used previous in ASP.

Thanks
Nov 18 '05 #5

P: n/a
Have never done it myself, But I think you will have to use Outlook
automation to access outbox. and if I remember correctly,
MAPI.Session.outbox.add may do what you want.

On Thu, 16 Sep 2004 12:31:14 +0200, "Michal" <ad*****@gazeta.pl>
wrote:
Everything is working correct but I have another question ;)))

Do you know how can I put email into user Outbox in Exchange 5.5 ?

I tried to do this using MAPI (Interop.MAPI - Microsoft CDO 1.21 Library)
but I can't find example for this.
It is the same componenet which I used previous in ASP.

Thanks


Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.