469,950 Members | 2,320 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

ASP.NET SMTP Email issue with IIS 6.0 on Win Server 2003

hi,

urgent assistance needed

I have been developing some webforms in VB.NET that have email
submissions. I developed them locally using VS .NET 2003 on XP Prof.
Then tested them on our development server running Win Server 200 and
IIS 5.0.

all was fine til i put them live on a new Intranet server using Windows
Server 2003 and IIS 6.0.

can't get the emails to work at all. the forms seem to submit
successfully but no email. The email is being directed to one of our
Exchange servers.

i know the SMTP service is running and in order as i tested an ASP form
using email and it delivered the emails fine.

- checked the Mailroot folder and no sign of the email in the Queue or
any other folders.

- checked for the CDOSYS.dll and re-registered it

think it may be to do with permissions.

see email code below:

Try
' Davids old way works on Win Server 2k
'Dim oEmail As New MailMessage

' Google Groups way
Dim oEmail As MailMessage = New MailMessage

oEmail.BodyFormat = MailFormat.Html
oEmail.Body = BodyText
oEmail.From = user

oEmail.To = tbx_confirm_email.Text

' Note: don't think this is working.
'oEmail.Cc = user

oEmail.Subject = "Book Order Form - " &
tbx_from_name.Text

Dim oSendEmail As Web.Mail.SmtpMail
oSendEmail.SmtpServer = "dcms-ex1"

oSendEmail.Send(oEmail)

Catch ex As Exception

'Label1.Text = "Thank you for your application.
However, you request has not been sent due to the error:<b>" &
ex.ToString()

End Try

-------------

thanks in advance for asny assistance, been trying to resolve this for
days now.

martin

Jan 18 '06 #1
2 1146
Have you set the smpt server to accept connections and relayed
messages?

If you select properties on the smtp server, then select 'Access',
there are two buttons at the bottom 'Connection...' and 'Relay...'. Set
both of these to 'All except listed below'.

Also, you need to ensure that port 25 or 26 is open for your smtp
server if you have a firewall in place.

I can't see any obvious problems with your code.

Cheers

Jared

Jan 18 '06 #2
thank you for your post Jared.

Problem solved, sort of i guess.

'All except listed below' was checked for both and the default SMTP
server was using port 25 and i could send email by ASP so that was
fine.

i found that removing the 'Enable Anonomous Access' and simply having
'Integrated Windows authentication' allowed email to be sent via
ASP.NET.

i think the IUSR_[servername] does not have the correct permissions for
ASP.NET. could that be the case?

martin

Jan 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by dale zhang | last post: by
9 posts views Thread by Bob Jones | last post: by
1 post views Thread by Michael D. Ober | last post: by
reply views Thread by =?Utf-8?B?TU9QU0M=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.