SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
-
Nov 18, 2013, 09:53 #1
Set SMTP Options in Windows Server 2003
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?
Code:<% 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 %>
-
Nov 18, 2013, 17:40 #2
- Join Date
- Jul 2003
- Location
- Northeastern USA
- Posts
- 4,617
- Mentioned
- 56 Post(s)
- Tagged
- 1 Thread(s)
http://support.microsoft.com/kb/303734
If you look in C:\inetpub, you should see various folders like "badmail", "Queue" and a few others. If you open the messages in a text editor, you can see if your messages are getting to the virtual SMTP and what some of the bounce messages might be if they aren't leaving the server.
To allow the virtual SMTP in IIS to sent mail directly through the internet, DNS lookups need to be enabled and outbound port 25 needs to be open in any firewalls.
However--I've typically just used the virtual SMTP as a LAN-only relay to an external email account, rather than using it to directly send out email.Visit The Blog | Follow On Twitter
301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
Can be hosted on and utilize your own domain
-
Nov 19, 2013, 06:18 #3
thank you for help.
this is the SMTP logs:
Code:#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
Code: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--
-
Nov 19, 2013, 07:00 #4
- Join Date
- Aug 2011
- Location
- OH, USA
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It looks like you script and virtual server works, but real email server not configured as relay for your virtual server. Usially mail servers allow realy emails only from restricted list of ip addresses
-
Nov 19, 2013, 08:16 #5
-
Nov 20, 2013, 09:11 #6
- Join Date
- Jul 2003
- Location
- Northeastern USA
- Posts
- 4,617
- Mentioned
- 56 Post(s)
- Tagged
- 1 Thread(s)
Did you want the virtual SMTP to act as a relay or a mail server?
To act as a relay:
- Open IIS
- Right click on the virtual SMTP > Properties
- Go to the delivery tab.
- Click the "outbound security" button.
- Select "basic authentication" and enter the username and password for the external email account. Check TLS encryption if the account uses a secured connection.
- Click ok. This should bring you back to the delivery tab.
- Click the "outbound connections" button. You can specify the outbound email port for the external email account here.
- Click ok. This should bring you back to the delivery tab.
- Click the "advanced" button.
- For "masquerade domain" enter the external email account's domain (the part of the email address after the @ symbol).
- For "fully qualified domain name", enter the server's FQDN (myserver.mydomain.local)
- For "smart host", enter the external email account's SMTP address.
- Click ok, then ok again.
Keep in mind--these instructions are for IIS 6.0, rather than 5.1, but if I recall, they should be fairly close.Visit The Blog | Follow On Twitter
301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
Can be hosted on and utilize your own domain
-
Nov 21, 2013, 06:25 #7
Many thanks for help, but in the bdr file says:
Unable to deliver this message because the follow error was
encountered: "This message is a delivery status notification that
cannot be delivered.".
The specific error code was 0xC00402C7.
The message sender was <>.
The message was intended for the following recipients.
I need configure the virtual SMTP to act as a relay
-
Nov 21, 2013, 21:01 #8
- Join Date
- Jul 2003
- Location
- Northeastern USA
- Posts
- 4,617
- Mentioned
- 56 Post(s)
- Tagged
- 1 Thread(s)
That is an error message for an error message. Basically, when an email can't be sent out, the virtual SMTP then attempts to sent out a notification that it can't send an email out. Then since that notification email can't be sent out, it generates another notification email saying that the notification message can't be sent--which is what you pasted above.
I need configure the virtual SMTP to act as a relay
I didn't include instructions for setting it up as a stand-alone SMTP because I am unfamiliar with that process.Visit The Blog | Follow On Twitter
301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
Can be hosted on and utilize your own domain
Bookmarks