473,410 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

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

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
5 1584
"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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: aish | last post by:
I want to send email using sql stored procedure.my code is work fine in my local sqlserver account. when I use my online sql server it display this error. EXECUTE permission denied on object...
8
by: Nick Li | last post by:
Hi, I am trying to writing a c program to send email using system() function call on Unix(Sun Solaris). I tried the following: #include <stdio.h> #include <stdio.h> int main(void) {
11
by: Mohammed Abdel-Razzak | last post by:
dear sirs i want to send email using c# but i don`t want to use CDONTS or tell me how can i use it i don`t know any thing about CDONTS thanks
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
0
by: padmanabhanp | last post by:
Hai, How to send email using jsp
2
usafshah
by: usafshah | last post by:
How can i send email using php through SMTP server ?
0
by: thinkwebs | last post by:
hi guys Just i am trying to send email using syste.web.mail in ASP.Net just i have send mail successfully in the web but i can't send mail with attachment in the web. But my coding works properly...
1
by: shaista | last post by:
How to send email thorugh exchange server? How to include sent emails into the sent item folder of mailbox through exchange server?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.