PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?TWljaGVsIFBvc3NldGggW01DUF0=?=
Guest
Posts: n/a
 
      24th Jul 2006

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




 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      24th Jul 2006
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]" <(E-Mail Removed)> schreef
in bericht news:BD4FD771-12C5-4D08-9796-(E-Mail Removed)...
>
> 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
>
>
>
>



 
Reply With Quote
 
=?Utf-8?B?TWljaGVsIFBvc3NldGggW01DUF0=?=
Guest
Posts: n/a
 
      24th Jul 2006
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]" <(E-Mail Removed)> schreef
> in bericht news:BD4FD771-12C5-4D08-9796-(E-Mail Removed)...
> >
> > 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
> >
> >
> >
> >

>
>
>

 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      24th Jul 2006
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]" <(E-Mail Removed)> schreef
in bericht news:13C9D311-A09C-45EF-A46B-(E-Mail Removed)...
> 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]" <(E-Mail Removed)>
>> schreef
>> in bericht news:BD4FD771-12C5-4D08-9796-(E-Mail Removed)...
>> >
>> > 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
>> >
>> >
>> >
>> >

>>
>>
>>



 
Reply With Quote
 
Goran Sliskovic
Guest
Posts: n/a
 
      24th Jul 2006
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

 
Reply With Quote
 
Michel Posseth [MCP]
Guest
Posts: n/a
 
      24th Jul 2006
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" <(E-Mail Removed)> schreef in bericht
news:%(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Goran Sliskovic
Guest
Posts: n/a
 
      24th Jul 2006
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
 
Reply With Quote
 
Michel Posseth [MCP]
Guest
Posts: n/a
 
      25th Jul 2006

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" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Nick Malik [Microsoft]
Guest
Posts: n/a
 
      30th Jul 2006
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]" <(E-Mail Removed)> wrote in
message news:13C9D311-A09C-45EF-A46B-(E-Mail Removed)...
> 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]" <(E-Mail Removed)>
>> schreef
>> in bericht news:BD4FD771-12C5-4D08-9796-(E-Mail Removed)...
>> >
>> > 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
>> >
>> >
>> >
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending reports via E-mail exchange server TheNovice Microsoft Access VBA Modules 0 18th Dec 2007 07:07 PM
Error sending mail when outlook is using Exchange server Richard Kure Microsoft Dot NET 5 7th Jun 2006 01:02 PM
Problem Sending Email Out When Exchange Server Used As Local Mail =?Utf-8?B?ZG9jamF5MjAwMw==?= Microsoft Outlook Discussion 0 9th Sep 2005 10:13 PM
Sending Mail using SMTP via Exchange Server - Need Help!!!!! =?Utf-8?B?QW5keSBHaWxlcw==?= Microsoft Outlook 1 9th Sep 2005 02:40 PM
Sending Email via Exchange server and System.Web.Mail RedEye Microsoft ASP .NET 2 18th Nov 2003 05:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:33 AM.