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

M

Mart

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
 
J

Jared

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
 
M

Mart

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top