Set SMTP Options in Windows Server 2003RSS

2 replies

Last post Nov 19, 2013 03:46 AM by MiguelRVR

  • Set SMTP Options in Windows Server 2003

    Nov 18, 2013 10:56 AM|MiguelRVR|LINK

    Hi, I need your help.

    I've set up the virtual smtp server on my IIS 5.1 like so:

    1. Assign IP address to "All Unassigned", and listen to port 25.
    2. Access Connection granted to "127.0.0.1".
    3. Relay only allow "127.0.0.1".
    4. Authentication: "Anonymous access" only.
    5. Outbound connection listen to TCP 25.

    I used the following code, and

    Response.Write("Your E-mail has been sent sucessfully - Thank You")

    is executed and I don't see any exception.

    However, the mail never arrived!

    So, what's the problem?

    <%
    
    schema = "http://schemas.microsoft.com/cdo/configuration/"
    Set objEmail = CreateObject("CDO.Message")
    With objEmail
    .From = "***@mydomain.com"
    .To = "***@mydomain.com"
    .Subject = "Test Mail"
    .Textbody = "The quick brown fox " & Chr(10) & "jumps over the lazy dog"
    With .Configuration.Fields
    .Item (schema & "sendusing") = 2
    .Item (schema & "smtpserver") = "localhost"
    .Item (schema & "smtpserverport") = 25
    .Item (schema & "smtpconnectiontimeout") = 10
    End With
    .Configuration.Fields.Update
    on error resume next
    .Send
    if Err.Number <> 0 then
    Response.Write("Email send failed # : " & Err.Number & " - " & Err.Description & ".<br />"&vbcrlf)
    else
    Response.Write("Your E-mail has been sent sucessfully - Thank You.<br />"&vbcrlf)
    end if
    End With
    
    %>



  • Re: Set SMTP Options in Windows Server 2003

    Nov 18, 2013 02:43 PM|jeff@zina.com|LINK

    MiguelRVR

    So, what's the problem?

    One problem is that IIS 5.1 runs on XP, not Server 2003. 

    But the real issue is that SMTP sends mail, it doesn't receive it.  Which means your code worked fine and sent it as expected.  Where did you expect it to arrive?

    You need to look at the SMTP logs to see what is going on.

    Jeff

    Have you Binged a solution before posting?
  • Re: Set SMTP Options in Windows Server 2003

    Nov 19, 2013 03:46 AM|MiguelRVR|LINK

    thank you for help.

    this is the SMTP logs:

    #Version: 1.0
    #Date: 2013-11-19 08:42:43
    #Fields: time c-ip cs-method cs-uri-stem sc-status
    08:42:43 10.XX.XX.XX HELO - 250
    08:42:43 10.XX.XX.XX MAIL - 250
    08:42:43 10.XX.XX.XX RCPT - 250
    08:42:43 10.XX.XX.XX RCPT - 250
    08:42:43 10.XX.XX.XX DATA - 250
    08:42:43 10.XX.XX.XX QUIT - 240


    The message is Received but not working the relay:

    Received: from XXXXXX ([XXXXXX]) by mydomain with Microsoft SMTPSVC(7.5.7600.16385);
    	 Tue, 19 Nov 2013 10:00:20 +0100
    Thread-Topic: test email 19/11/2013 9.57.54
    thread-index: Ac7lBW94CxIYsbtCSGCycUK8OhMa1A==
    X-MSMail-Priority: 6
    From: <*****@mydomain.com>
    To: <*****@mydomain.com>
    Cc: <*****@mydomain.com>
    Subject: test email 19/11/2013 9.57.54
    Date: Tue, 19 Nov 2013 09:57:54 +0100
    Message-ID: <E25CF2F4123A408DB726E5DD65BBE0D5@******>
    MIME-Version: 1.0
    Content-Type: multipart/alternative;
    	boundary="----=_NextPart_000_01A2_01CEE50D.D13D63C0"
    X-Mailer: Microsoft CDO for Windows 2000
    Content-Class: urn:content-classes:message
    Importance: high
    Priority: normal
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3959
    Return-Path: *****@mydomain.com
    X-OriginalArrivalTime: 19 Nov 2013 09:00:20.0042 (UTC) FILETIME=[C60952A0:01CEE505]
    
    This is a multi-part message in MIME format.
    
    ------=_NextPart_000_01A2_01CEE50D.D13D63C0
    Content-Type: text/plain;
    	charset="iso-8859-1"
    Content-Transfer-Encoding: 7bit
    
    test email 19/11/2013 9.57.54
    
    ------=_NextPart_000_01A2_01CEE50D.D13D63C0
    Content-Type: text/html
    Content-Transfer-Encoding: 7bit
    
    test email 19/11/2013 9.57.54
    ------=_NextPart_000_01A2_01CEE50D.D13D63C0--