473,406 Members | 2,710 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,406 software developers and data experts.

sending e-mail from .Net app with MS exchange server


Hi does someone has experience with this ??

i have made a lot of apps in the past that were capable of sending e-mails
the server i then talked to was a Linux SMTP server and it worked great

Now i work in a company with a MS exchange server and would like to send
some e-mails however i can`t get it to work at all

error is : ( translated form the dutch language )

can`t connect as the target computer actively refused the connection

Strange as i am on the same domain as the exchange server and use windows
authentication to the server ( .Net 2.0 ) with outlook i can send e-mails
without anny problems ( and i can ping the exchange server )

does something has to be done at the MS exchange side or am i missing
something ???
regards

Michel Posseth


Jul 24 '06 #1
8 2818
Michel,

The exchange server does nothing excluding that you want to sent in the name
of somebody.

If you just want to use smtp than you can have a look at that website for
that.
http://www.systemwebmail.net/
(there is a special method that let you use the exchange server, have a
search yourself for that)

If you want to use it in the name of somebody, than you have to use mapi, be
aware that the last in my expirience was slow (but it is a long time ago
that I did that).
http://msdn.microsoft.com/library/de...chsvr_mapi.asp

However probably is this more that you are looking for.
http://msdn.microsoft.com/library/de...OtlkLOBCRM.asp

Cor

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.comschre ef
in bericht news:BD**********************************@microsof t.com...
>
Hi does someone has experience with this ??

i have made a lot of apps in the past that were capable of sending e-mails
the server i then talked to was a Linux SMTP server and it worked great

Now i work in a company with a MS exchange server and would like to send
some e-mails however i can`t get it to work at all

error is : ( translated form the dutch language )

can`t connect as the target computer actively refused the connection

Strange as i am on the same domain as the exchange server and use windows
authentication to the server ( .Net 2.0 ) with outlook i can send e-mails
without anny problems ( and i can ping the exchange server )

does something has to be done at the MS exchange side or am i missing
something ???
regards

Michel Posseth


Jul 24 '06 #2
Hello Cor ,,,
Well if what i read and find sofar in online resources is true that i would
be really dissapointed
If you just want to use smtp than you can have a look at that website for
that.
http://www.systemwebmail.net/
(there is a special method that let you use the exchange server, have a
search yourself for that)
I had found this website also through google however i did not find anny
code , example or article how to send e-mail through an exchange server .

The technet website however states that Exchange is fully SMTP capable
I try to send e-mails at this moment from my development computer loged in
under my own name ( windows authentication to exchange ) so i am not doing
annything odd that might interfere with the login credentials

my Dissaqpointment lies in the fact that in my previous work environment we
used a Linux mail server and everything worked as expected now with exchange
in a domain environment i can`t send anny e-mails with the .Net built in
methods


regards

Michel


"Cor Ligthert [MVP]" wrote:
Michel,

The exchange server does nothing excluding that you want to sent in the name
of somebody.

If you just want to use smtp than you can have a look at that website for
that.
http://www.systemwebmail.net/
(there is a special method that let you use the exchange server, have a
search yourself for that)

If you want to use it in the name of somebody, than you have to use mapi, be
aware that the last in my expirience was slow (but it is a long time ago
that I did that).
http://msdn.microsoft.com/library/de...chsvr_mapi.asp

However probably is this more that you are looking for.
http://msdn.microsoft.com/library/de...OtlkLOBCRM.asp

Cor

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.comschre ef
in bericht news:BD**********************************@microsof t.com...

Hi does someone has experience with this ??

i have made a lot of apps in the past that were capable of sending e-mails
the server i then talked to was a Linux SMTP server and it worked great

Now i work in a company with a MS exchange server and would like to send
some e-mails however i can`t get it to work at all

error is : ( translated form the dutch language )

can`t connect as the target computer actively refused the connection

Strange as i am on the same domain as the exchange server and use windows
authentication to the server ( .Net 2.0 ) with outlook i can send e-mails
without anny problems ( and i can ping the exchange server )

does something has to be done at the MS exchange side or am i missing
something ???
regards

Michel Posseth




Jul 24 '06 #3
Michel,

I think that you are right I never saw a real clean solution for this in the
newsgroups. And my last strugles with Exchange server was using the Mapi,
but that is very basic. I could see the mails going out one by one.

I thought that Jay has some years ago written something about this.

I see Jay not anymore active in this newsgroup a while, therefore I would
place it in the newsgroup languages as well. With the same topic but that
exchange/outlook server.

Cor

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.comschre ef
in bericht news:13**********************************@microsof t.com...
Hello Cor ,,,
Well if what i read and find sofar in online resources is true that i
would
be really dissapointed
>If you just want to use smtp than you can have a look at that website
for
that.
http://www.systemwebmail.net/
(there is a special method that let you use the exchange server, have a
search yourself for that)

I had found this website also through google however i did not find anny
code , example or article how to send e-mail through an exchange server .

The technet website however states that Exchange is fully SMTP capable
I try to send e-mails at this moment from my development computer loged in
under my own name ( windows authentication to exchange ) so i am not
doing
annything odd that might interfere with the login credentials

my Dissaqpointment lies in the fact that in my previous work environment
we
used a Linux mail server and everything worked as expected now with
exchange
in a domain environment i can`t send anny e-mails with the .Net built in
methods


regards

Michel


"Cor Ligthert [MVP]" wrote:
>Michel,

The exchange server does nothing excluding that you want to sent in the
name
of somebody.

If you just want to use smtp than you can have a look at that website
for
that.
http://www.systemwebmail.net/
(there is a special method that let you use the exchange server, have a
search yourself for that)

If you want to use it in the name of somebody, than you have to use mapi,
be
aware that the last in my expirience was slow (but it is a long time ago
that I did that).
http://msdn.microsoft.com/library/de...chsvr_mapi.asp

However probably is this more that you are looking for.
http://msdn.microsoft.com/library/de...OtlkLOBCRM.asp

Cor

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.com>
schreef
in bericht news:BD**********************************@microsof t.com...
>
Hi does someone has experience with this ??

i have made a lot of apps in the past that were capable of sending
e-mails
the server i then talked to was a Linux SMTP server and it worked great

Now i work in a company with a MS exchange server and would like to
send
some e-mails however i can`t get it to work at all

error is : ( translated form the dutch language )

can`t connect as the target computer actively refused the connection

Strange as i am on the same domain as the exchange server and use
windows
authentication to the server ( .Net 2.0 ) with outlook i can send
e-mails
without anny problems ( and i can ping the exchange server )

does something has to be done at the MS exchange side or am i missing
something ???
regards

Michel Posseth




Jul 24 '06 #4
Michel Posseth [MCP] wrote:
Hi does someone has experience with this ??

i have made a lot of apps in the past that were capable of sending e-mails
the server i then talked to was a Linux SMTP server and it worked great

Now i work in a company with a MS exchange server and would like to send
some e-mails however i can`t get it to work at all

error is : ( translated form the dutch language )

can`t connect as the target computer actively refused the connection
....
This means that Exchange server is not listening on port 25 (SMTP). It
may not be configured to provide SMTP or may use different port.

From the command line, type:
telnet serverip 25

if you don't get welcome message, .NET will not be able to send email
for sure.

Regards,
Goran

Jul 24 '06 #5
Hello Goran,,
Thank you verry much ,,, indeed it turned out that the exchange server was
not configured for SMTP at all even better it was closed on purpose
turned out , they have a seperate SMTP relay server on the intranet ( wich
in his turn comunicates to the exchange server ) .

Next time i wil talk sooner to one of the Tech guys , when my prooved code
is not working on this intranet :-)
i told the problem and one of them said inmediatly yes you need to use
another server to do that :-( aarghh

But i still think that it is strange that you can`t comunicate directly to
exchange server in it`s native format , cause outlook can so why can`t we
??

regards

And thanks to both of you , Goran and Cor for helping me out



"Goran Sliskovic" <gs******@yahoo.comschreef in bericht
news:%2***************@TK2MSFTNGP02.phx.gbl...
Michel Posseth [MCP] wrote:
>Hi does someone has experience with this ?? i have made a lot of apps in
the past that were capable of sending e-mails the server i then talked to
was a Linux SMTP server and it worked great Now i work in a company with
a MS exchange server and would like to send some e-mails however i can`t
get it to work at all error is : ( translated form the dutch language )
can`t connect as the target computer actively refused the connection
...
This means that Exchange server is not listening on port 25 (SMTP). It may
not be configured to provide SMTP or may use different port.

From the command line, type:
telnet serverip 25

if you don't get welcome message, .NET will not be able to send email for
sure.

Regards,
Goran

Jul 24 '06 #6
Michel Posseth [MCP] wrote:
Hello Goran,,
Thank you verry much ,,, indeed it turned out that the exchange server was
not configured for SMTP at all even better it was closed on purpose
turned out , they have a seperate SMTP relay server on the intranet ( wich
in his turn comunicates to the exchange server ) .

Next time i wil talk sooner to one of the Tech guys , when my prooved code
is not working on this intranet :-)
i told the problem and one of them said inmediatly yes you need to use
another server to do that :-( aarghh

But i still think that it is strange that you can`t comunicate directly to
exchange server in it`s native format , cause outlook can so why can`t we
??
....

Hi,
Outlook probably uses MAPI, which is different protocol. You were trying
to send email over SMTP which Exchange server was not configured to use.

Regards,
Goran
Jul 24 '06 #7

Yes i understand that,,,, however isn`t it strange that MS did not add a
Mapi or whatever protocol is used class to the .Net framework to talk to
exchange ??
i can only find an unmanaged MAPI ocx that was already used i.c.w. VB6

another option i found was interop with outlook and so send your e-mails
wich is not suitable for my purposes as not all of the target comps have
outlook installed ( servers ) so ,,,,,,

regards

Michel

"Goran Sliskovic" <gs******@yahoo.comschreef in bericht
news:Ox**************@TK2MSFTNGP02.phx.gbl...
Michel Posseth [MCP] wrote:
>Hello Goran,,
Thank you verry much ,,, indeed it turned out that the exchange server
was not configured for SMTP at all even better it was closed on purpose
turned out , they have a seperate SMTP relay server on the intranet (
wich in his turn comunicates to the exchange server ) .

Next time i wil talk sooner to one of the Tech guys , when my prooved
code is not working on this intranet :-)
i told the problem and one of them said inmediatly yes you need to use
another server to do that :-( aarghh

But i still think that it is strange that you can`t comunicate directly
to exchange server in it`s native format , cause outlook can so why
can`t we ??
...

Hi,
Outlook probably uses MAPI, which is different protocol. You were trying
to send email over SMTP which Exchange server was not configured to use.

Regards,
Goran

Jul 25 '06 #8
You can send SMTP mail messages to an Exchange server. However, you usually
have to specify the authentication credentials in the outbound mail.

The systemwebmail.net site has examples of adding credentials to your mail
header.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.comwrote in
message news:13**********************************@microsof t.com...
Hello Cor ,,,
Well if what i read and find sofar in online resources is true that i
would
be really dissapointed
>If you just want to use smtp than you can have a look at that website
for
that.
http://www.systemwebmail.net/
(there is a special method that let you use the exchange server, have a
search yourself for that)

I had found this website also through google however i did not find anny
code , example or article how to send e-mail through an exchange server .

The technet website however states that Exchange is fully SMTP capable
I try to send e-mails at this moment from my development computer loged in
under my own name ( windows authentication to exchange ) so i am not
doing
annything odd that might interfere with the login credentials

my Dissaqpointment lies in the fact that in my previous work environment
we
used a Linux mail server and everything worked as expected now with
exchange
in a domain environment i can`t send anny e-mails with the .Net built in
methods


regards

Michel


"Cor Ligthert [MVP]" wrote:
>Michel,

The exchange server does nothing excluding that you want to sent in the
name
of somebody.

If you just want to use smtp than you can have a look at that website
for
that.
http://www.systemwebmail.net/
(there is a special method that let you use the exchange server, have a
search yourself for that)

If you want to use it in the name of somebody, than you have to use mapi,
be
aware that the last in my expirience was slow (but it is a long time ago
that I did that).
http://msdn.microsoft.com/library/de...chsvr_mapi.asp

However probably is this more that you are looking for.
http://msdn.microsoft.com/library/de...OtlkLOBCRM.asp

Cor

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.com>
schreef
in bericht news:BD**********************************@microsof t.com...
>
Hi does someone has experience with this ??

i have made a lot of apps in the past that were capable of sending
e-mails
the server i then talked to was a Linux SMTP server and it worked great

Now i work in a company with a MS exchange server and would like to
send
some e-mails however i can`t get it to work at all

error is : ( translated form the dutch language )

can`t connect as the target computer actively refused the connection

Strange as i am on the same domain as the exchange server and use
windows
authentication to the server ( .Net 2.0 ) with outlook i can send
e-mails
without anny problems ( and i can ping the exchange server )

does something has to be done at the MS exchange side or am i missing
something ???
regards

Michel Posseth




Jul 30 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim Black | last post by:
My application requires sending a large piece (~2MB) of data to several devices on a network via TCP sockets. I have experimented with different methods for doing this and this has raised some...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
2
by: anonymous | last post by:
Hi, I'am sending an xml string to a web service(which is written in c#) using the microsoft web services behavior. When I check this string from the web service I observed that some of the...
2
by: Ebrahim | last post by:
Does any one have any suggestion of Sending Files over a Network ? using TcpClient class in C#. I need suggestions on transferring huge files ( > 5MB) reliably over the stream . Also any kind of...
4
by: Winston Nimchan | last post by:
Hi: I'm currently developing a socket application and would like to precede the data being sent with a 4 byte message length header (bin4). Can anyone help Regards Winston
7
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
3
by: Sells, Fred | last post by:
I'm using MSW XP Pro with Python 2.4 to develop but production will be Linux with Python 2.3. (could upgrade to 2.4 if absolutely necessary) I can also switch to Linux for development if...
9
by: Miro | last post by:
VB 2003 at the end of the code, this works great. bytCommand = Encoding.ASCII.GetBytes("testing hello send text") udpClient.Send(bytCommand, bytCommand.Length) and this recieves it Dim...
8
by: Amol | last post by:
Hi , I am developing a web application.I need an interface in my application which will allow the user to send the fax domestic /international.I dont want to use 3rd party tool /service .Does...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.