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

Discussion in 'ASP .Net' started by Mart, Jan 18, 2006.

  1. Mart

    Mart Guest

    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
     
    Mart, Jan 18, 2006
    #1
    1. Advertising

  2. Mart

    Jared Guest

    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
     
    Jared, Jan 18, 2006
    #2
    1. Advertising

  3. Mart

    Mart Guest

    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
     
    Mart, Jan 18, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RHIuIFBhdWwgQ2Flc2FyIC0gQ291bGxCeXRlIChV

    ASP.NET 1.1 VERSION ON WIN SERVER 2003 SP1 & VS 2003 Arch.

    =?Utf-8?B?RHIuIFBhdWwgQ2Flc2FyIC0gQ291bGxCeXRlIChV, Apr 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    612
    Aquila Deus
    Apr 30, 2005
  2. Krist
    Replies:
    6
    Views:
    801
    Arne Vajhøj
    May 7, 2010
  3. Raj
    Replies:
    2
    Views:
    158
    Aaron Bertrand [MVP]
    Apr 14, 2004
  4. weiwei

    email asp & smtp in win 2003

    weiwei, Oct 7, 2004, in forum: ASP General
    Replies:
    2
    Views:
    132
    Just1Coder
    Oct 7, 2004
  5. Klaus
    Replies:
    19
    Views:
    290
    Martijn Lievaart
    Aug 21, 2010
Loading...

Share This Page