Re: Mail sent through IIS virtual SMTP server not arriving
- From: "Juan T. Llibre" <nomailreplies@xxxxxxxxxxx>
- Date: Thu, 2 Mar 2006 20:28:39 -0400
re:
But, I am trying to test if I can send email in my web application
through the IIS virtual SMTP server only.
I just checked the logfile like you instructed.
You checked the HTTP log ( \%windir%\system32\LogFiles\W3SVC1 ),
but not the SMTP log.
The line :
18:25:16 130.126.83.20 POST /sendmail/vmailman.aspx 200
tells you that you POSTed to sendmail.
It doesn't tell you what the smtp server did with that POST.
Please check the \%windir%\system32\LogFiles\smtpsvc1 logs.
( and send the last 8 lines of today's log... )
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<antonyliu2002@xxxxxxxxx> wrote in message
news:1141343736.478843.3310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, Juan,
Thanks, I just checked the logfile like you instructed. And here is a
part of it. You will see GET /favicon.ico 404 in the log. And here is
a dicussion of it:
http://www.webmasterworld.com/forum39/104.htm
And for the definition of the HTTP code 200, see here:
http://64.233.179.104/search?q=cache:7vjrLlciKIIJ:www.w3.org/Protocols/rfc2616/rfc2616-sec10.html+http+code+200&hl=en&gl=us&ct=clnk&cd=1
So, given the log below, could you diagnose what problem it is?
Thanks.
#Software: Microsoft Internet Information Services 5.1
#Version: 1.0
#Date: 2006-03-02 18:25:16
#Fields: time c-ip cs-method cs-uri-stem sc-status
18:25:16 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:25:16 130.126.83.20 GET /favicon.ico 404
Juan T. Llibre wrote:
re:
By quoting "sent", I meant that at least it looks like to have been sent.
The way to find out, for sure, is to turn on smtp logging.
To turn on logging, open the IIS Manager,
and select the Default SMTP Server's properties.
You'll see the option for turning it on and for selecting the type of log.
Clicking the Properties and then the Advanced button lets you select the fields to log.
The log, by default, will be stored at \windowsdir\system32\LogFiles\smtpsvc1
You should see entries like :
2006-03-01 14:58:32 111.111.111.111 smtpservername SMTPSVC1 0 HELO 250 33 - -
2006-03-01 14:58:32 111.111.111.111 smtpservername SMTPSVC1 0 MAIL 250 47 - -
2006-03-01 14:58:32 111.111.111.111 smtpservername SMTPSVC1 0 RCPT 250 34 - -
2006-03-01 14:58:32 111.111.111.111 smtpservername SMTPSVC1 0 DATA 250 125 - -
If the mail packet was successfully sent, the success code is 250.
Any other code means some sort of problem
which prevented the mail from getting sent.
Check that...and let us know what you see after you attempt to send mail.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<antonyliu2002@xxxxxxxxx> wrote in message
news:1141334388.659081.161380@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks, Bruce.
I know that I won't have any problem for my application in sending and
receiving email if I simply use the SMTP server of my ISP. I tried it,
and it worked perfectly fine. And in this case, I don't have do
anything about the virtual SMTP server on my IIS 5.1.
But, I am trying to test if I can send email in my web application
through the IIS virtual SMTP server only.
So if I end up having to forward to my ISP's SMTP server, it'll beat my
objective, plus, I could have just used my ISP's SMTP service.
So, any idea about why I am not receiving the mail "sent" from the
virtual SMTP? By quoting "sent", I meant that at least it looks like
to have been sent.
Bruce Barker wrote:
you probably need to configure the smtp server to correctly forward mail to
your isp's smtp server. does the isp smtp require authenication? does it
require the from match authenication?
-- bruce (sqlwork.com)
<antonyliu2002@xxxxxxxxx> wrote in message
news:1141326363.348796.259540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
Besides,
6. I've opened up port 25 in my Linksys WRT45G wireless router.
7. I've made port 25 an exception in my WinXP Pro built-in firewall.
8. Unblocked port 25 in McAfee 8.0 enterprise edition.
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?
Is it possible to configure the virtual SMTP server to listen to a
non-standard port for just sending email? I heard that my ISP SBC DSL
blocks port 25. If this is possible, how to let it listen to a
different port?
***** The code I use ***********
<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Web.Mail" %>
<script runat="server">
Sub btnSubmit_Click(sender as object, e as EventArgs)
If Page.IsValid Then
' Create a new blank MailMessage
Dim mailMessage As MailMessage = new MailMessage ()
mailMessage.From = txtFrom.Text
mailMessage.To = txtTo.Text
mailMessage.Cc = txtCc.Text
mailMessage.Subject = "Test SMTP Message Send using port"
mailMessage.Body = txtName.Text & ", " &txtComments.Text
SmtpMail.SmtpServer = "127.0.0.1"
Try
SmtpMail.Send(mailMessage)
Response.Write("Your E-mail has been sent sucessfully - Thank You")
Catch ex As Exception
Response.Write(("The following exception occurred: " +
ex.ToString()))
'check the InnerException
While Not (ex.InnerException Is Nothing)
Response.Write("--------------------------------")
Response.Write(("The following InnerException reported: "
+ ex.InnerException.ToString()))
ex = ex.InnerException
End While
End Try
End If
End Sub
</script>
The HTML that follows this code snippet is not pasted.
.
- Follow-Ups:
- Re: Mail sent through IIS virtual SMTP server not arriving
- From: antonyliu2002@xxxxxxxxx
- Re: Mail sent through IIS virtual SMTP server not arriving
- From: antonyliu2002@xxxxxxxxx
- Re: Mail sent through IIS virtual SMTP server not arriving
- From: antonyliu2002@xxxxxxxxx
- Re: Mail sent through IIS virtual SMTP server not arriving
- References:
- Mail sent through IIS virtual SMTP server not arriving
- From: antonyliu2002@xxxxxxxxx
- Re: Mail sent through IIS virtual SMTP server not arriving
- From: Bruce Barker
- Re: Mail sent through IIS virtual SMTP server not arriving
- From: antonyliu2002@xxxxxxxxx
- Re: Mail sent through IIS virtual SMTP server not arriving
- From: Juan T. Llibre
- Re: Mail sent through IIS virtual SMTP server not arriving
- From: antonyliu2002@xxxxxxxxx
- Mail sent through IIS virtual SMTP server not arriving
- Prev by Date: Re: accent and Request.Form
- Next by Date: Re: localization & storing text in database.
- Previous by thread: Re: Mail sent through IIS virtual SMTP server not arriving
- Next by thread: Re: Mail sent through IIS virtual SMTP server not arriving
- Index(es):