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

SMTP Settings on Production Machine

P: n/a
Please help: I found some of the following information in messeges in this
group but I would like someone to confirm them please.

I would like to use the following web-services / ASP.Net code to be used in
an intranet environment:

MailMessage Message = new MailMessage();
Message.To = ...
....
SmtpMail.SmtpServer = ...
SmtpMail.Send(Message);

In order for this code to work on a production machine the following IIS
components will be required (is that correct):
1. WWW Server, etc.
2. SMTP Service

Is the [SMTP Service] required even if there is Exchange-Server running on
another server?

In order to making e-mailing work with a domain-user recognised by the
exchange-server, is it true that I need to edit web.config file in the
following way?

<identity
impersonate="true"
userName="DOMAIN\UserName"
password="Password" />

Does this mean that this ASP.Net will use this identity for all server
accesses including database access? Should I be setting database security
for this application using this identity and not the ASPNET user?

Please help and give more info.
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
asp.net does not support exchange. it only talks to SMTP, so your exchange
server must host SMTP. The SMTP does not need to be local, just one you have
access to. the standard asp.net mail library does not support any
authentication, if you use the lower level CDO library you can add headers
to support basic.

its common to setup a local SMTP server that talks to the real SMTP server
becuase it can supply authenication.

if you buy a third part email control that supports exchange, you will need
to setup an identity in the web config, but its not used by SMTP.

-- bruce (sqlwork.com)

"Tushar" <xx*************@CODA.com> wrote in message
news:ue**************@TK2MSFTNGP12.phx.gbl...
Please help: I found some of the following information in messeges in this
group but I would like someone to confirm them please.

I would like to use the following web-services / ASP.Net code to be used in an intranet environment:

MailMessage Message = new MailMessage();
Message.To = ...
...
SmtpMail.SmtpServer = ...
SmtpMail.Send(Message);

In order for this code to work on a production machine the following IIS
components will be required (is that correct):
1. WWW Server, etc.
2. SMTP Service

Is the [SMTP Service] required even if there is Exchange-Server running on
another server?

In order to making e-mailing work with a domain-user recognised by the
exchange-server, is it true that I need to edit web.config file in the
following way?

<identity
impersonate="true"
userName="DOMAIN\UserName"
password="Password" />

Does this mean that this ASP.Net will use this identity for all server
accesses including database access? Should I be setting database security
for this application using this identity and not the ASPNET user?

Please help and give more info.

Nov 18 '05 #2

P: n/a
Thank you for the reply Bruce.

I am confused, if ASP.Net does not use authentication and I'm currently
using Exchange-Server, be it via SMTP, then how is it sending out emails? I
though Exchange Server requires authentication.

Please help.

regards,
Tushar

"bruce barker" <no***********@safeco.com> wrote in message
news:O6**************@TK2MSFTNGP14.phx.gbl...
asp.net does not support exchange. it only talks to SMTP, so your exchange
server must host SMTP. The SMTP does not need to be local, just one you have
access to. the standard asp.net mail library does not support any
authentication, if you use the lower level CDO library you can add headers
to support basic.

its common to setup a local SMTP server that talks to the real SMTP server
becuase it can supply authenication.

if you buy a third part email control that supports exchange, you will need
to setup an identity in the web config, but its not used by SMTP.

-- bruce (sqlwork.com)

"Tushar" <xx*************@CODA.com> wrote in message
news:ue**************@TK2MSFTNGP12.phx.gbl...
Please help: I found some of the following information in messeges in this
group but I would like someone to confirm them please.

I would like to use the following web-services / ASP.Net code to be used in an intranet environment:

MailMessage Message = new MailMessage();
Message.To = ...
...
SmtpMail.SmtpServer = ...
SmtpMail.Send(Message);

In order for this code to work on a production machine the following IIS
components will be required (is that correct):
1. WWW Server, etc.
2. SMTP Service

Is the [SMTP Service] required even if there is Exchange-Server running on
another server?

In order to making e-mailing work with a domain-user recognised by the
exchange-server, is it true that I need to edit web.config file in the
following way?

<identity
impersonate="true"
userName="DOMAIN\UserName"
password="Password" />

Does this mean that this ASP.Net will use this identity for all server
accesses including database access? Should I be setting database security
for this application using this identity and not the ASPNET user?

Please help and give more info.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004
Nov 18 '05 #3

P: n/a

"Tushar" <xx*************@CODA.com> wrote in message
news:ue**************@TK2MSFTNGP12.phx.gbl...
In order for this code to work on a production machine the following IIS
components will be required (is that correct):
1. WWW Server, etc.
2. SMTP Service
On Windows 2000 and 2003 the classes in System.Web.Mail are essentially
wrappers for the CDOSYS library. I don't think IIS installs CDOSYS, though I
might be wrong about that. I believe it's part of the server itself.
Is the [SMTP Service] required even if there is Exchange-Server running on
another server?
No, the local SMTP is only needed if you are using it as a pickup/relay
system to another "smart host", typically an Exchange server. If you're
doing SMTP directly to the Exchange box then there's no need for it.
In order to making e-mailing work with a domain-user recognised by the
exchange-server, is it true that I need to edit web.config file in the
following way?
No, that depends on the Exchange server configuration. Normally it's
configured to relay mail only from a set of IP addresses (i.e., your
intranet), and more often than not they also require a valid domain address
(though not a mailbox). So you can send mail from 'm****@mydomain.tld' and
if the Exchange box accepts that then you should be OK. It has nothing to do
with NT security.
Does this mean that this ASP.Net will use this identity for all server
accesses including database access? Should I be setting database security
for this application using this identity and not the ASPNET user?


You don't need it, so the database authentication is another matter.
Personally I tend to stay away from integrated authentication and just use a
standard SQL Server login/password to connect to the database.
--

Klaus H. Probst, MVP
http://www.vbbox.com/
Nov 18 '05 #4

P: n/a
Thanks

"Klaus H. Probst" <us*******@vbbox.com> wrote in message
news:e4*************@TK2MSFTNGP11.phx.gbl...

"Tushar" <xx*************@CODA.com> wrote in message
news:ue**************@TK2MSFTNGP12.phx.gbl...
In order for this code to work on a production machine the following IIS
components will be required (is that correct):
1. WWW Server, etc.
2. SMTP Service
On Windows 2000 and 2003 the classes in System.Web.Mail are essentially
wrappers for the CDOSYS library. I don't think IIS installs CDOSYS, though

I might be wrong about that. I believe it's part of the server itself.
Is the [SMTP Service] required even if there is Exchange-Server running on another server?
No, the local SMTP is only needed if you are using it as a pickup/relay
system to another "smart host", typically an Exchange server. If you're
doing SMTP directly to the Exchange box then there's no need for it.
In order to making e-mailing work with a domain-user recognised by the
exchange-server, is it true that I need to edit web.config file in the
following way?


No, that depends on the Exchange server configuration. Normally it's
configured to relay mail only from a set of IP addresses (i.e., your
intranet), and more often than not they also require a valid domain

address (though not a mailbox). So you can send mail from 'm****@mydomain.tld' and
if the Exchange box accepts that then you should be OK. It has nothing to do with NT security.
Does this mean that this ASP.Net will use this identity for all server
accesses including database access? Should I be setting database security for this application using this identity and not the ASPNET user?
You don't need it, so the database authentication is another matter.
Personally I tend to stay away from integrated authentication and just use

a standard SQL Server login/password to connect to the database.
--

Klaus H. Probst, MVP
http://www.vbbox.com/

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.