473,737 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mail sent through IIS virtual SMTP server not arriving

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="Syst em.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.Fro m = txtFrom.Text
mailMessage.To = txtTo.Text
mailMessage.Cc = txtCc.Text
mailMessage.Sub ject = "Test SMTP Message Send using port"
mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
SmtpMail.SmtpSe rver = "127.0.0.1"

Try
SmtpMail.Send(m ailMessage)
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.InnerExcept ion Is Nothing)
Response.Write( "--------------------------------")
Response.Write( ("The following InnerException reported: "
+ ex.InnerExcepti on.ToString()))
ex = ex.InnerExcepti on
End While
End Try
End If
End Sub
</script>

The HTML that follows this code snippet is not pasted.

Mar 2 '06 #1
34 18265
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)
<an***********@ yahoo.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
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="Syst em.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.Fro m = txtFrom.Text
mailMessage.To = txtTo.Text
mailMessage.Cc = txtCc.Text
mailMessage.Sub ject = "Test SMTP Message Send using port"
mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
SmtpMail.SmtpSe rver = "127.0.0.1"

Try
SmtpMail.Send(m ailMessage)
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.InnerExcept ion Is Nothing)
Response.Write( "--------------------------------")
Response.Write( ("The following InnerException reported: "
+ ex.InnerExcepti on.ToString()))
ex = ex.InnerExcepti on
End While
End Try
End If
End Sub
</script>

The HTML that follows this code snippet is not pasted.

Mar 2 '06 #2

2/8/2006

http://spaces.msn.com/sholliday/
Check this blog.

This will help you with the coding side of the issue. I have 1.1 and
2.0 code.

as far as the IIS setup
Then check the wwwroot\mail\qu eue folder.

If items are "stuck" in here, then the issue is your smarthost setup
(the stuff you describe below).
Sometimes its a tug and pull affair, and it depends on the end isp you
have.

my smtp.nc.rr.com was finicky.


<an***********@ yahoo.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
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="Syst em.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.Fro m = txtFrom.Text
mailMessage.To = txtTo.Text
mailMessage.Cc = txtCc.Text
mailMessage.Sub ject = "Test SMTP Message Send using port"
mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
SmtpMail.SmtpSe rver = "127.0.0.1"

Try
SmtpMail.Send(m ailMessage)
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.InnerExcept ion Is Nothing)
Response.Write( "--------------------------------")
Response.Write( ("The following InnerException reported: "
+ ex.InnerExcepti on.ToString()))
ex = ex.InnerExcepti on
End While
End Try
End If
End Sub
</script>

The HTML that follows this code snippet is not pasted.

Mar 2 '06 #3
Best resource for 1.1 mail issues http://www.systemwebmail.com
For 2.0 http://www.systemnetmail.com

Mar 2 '06 #4
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)
<an***********@ yahoo.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
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="Syst em.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.Fro m = txtFrom.Text
mailMessage.To = txtTo.Text
mailMessage.Cc = txtCc.Text
mailMessage.Sub ject = "Test SMTP Message Send using port"
mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
SmtpMail.SmtpSe rver = "127.0.0.1"

Try
SmtpMail.Send(m ailMessage)
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.InnerExcept ion Is Nothing)
Response.Write( "--------------------------------")
Response.Write( ("The following InnerException reported: "
+ ex.InnerExcepti on.ToString()))
ex = ex.InnerExcepti on
End While
End Try
End If
End Sub
</script>

The HTML that follows this code snippet is not pasted.


Mar 2 '06 #5
Hi, Sloan,

Thanks. I just checked \Inetpub\mailro ot\Queue\. Indeed, all of the
messages are lying there. So apparently, they were not sent.

Don't know what went wrong. So, you think it has to do with my ISP:
SBC DSL?

I know that they block port 25. So, is it possible to set up my IIS
SMTP server to listen to a nonstandard port for just outgoing messages?
sloan wrote:
2/8/2006

http://spaces.msn.com/sholliday/
Check this blog.

This will help you with the coding side of the issue. I have 1.1 and
2.0 code.

as far as the IIS setup
Then check the wwwroot\mail\qu eue folder.

If items are "stuck" in here, then the issue is your smarthost setup
(the stuff you describe below).
Sometimes its a tug and pull affair, and it depends on the end isp you
have.

my smtp.nc.rr.com was finicky.


<an***********@ yahoo.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
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="Syst em.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.Fro m = txtFrom.Text
mailMessage.To = txtTo.Text
mailMessage.Cc = txtCc.Text
mailMessage.Sub ject = "Test SMTP Message Send using port"
mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
SmtpMail.SmtpSe rver = "127.0.0.1"

Try
SmtpMail.Send(m ailMessage)
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.InnerExcept ion Is Nothing)
Response.Write( "--------------------------------")
Response.Write( ("The following InnerException reported: "
+ ex.InnerExcepti on.ToString()))
ex = ex.InnerExcepti on
End While
End Try
End If
End Sub
</script>

The HTML that follows this code snippet is not pasted.


Mar 2 '06 #6
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\sys tem32\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/
=============== =============== =====
<an***********@ yahoo.com> wrote in message
news:11******** **************@ p10g2000cwp.goo glegroups.com.. . 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)
<an***********@ yahoo.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
> 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="Syst em.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.Fro m = txtFrom.Text
> mailMessage.To = txtTo.Text
> mailMessage.Cc = txtCc.Text
> mailMessage.Sub ject = "Test SMTP Message Send using port"
> mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
> SmtpMail.SmtpSe rver = "127.0.0.1"
>
> Try
> SmtpMail.Send(m ailMessage)
> 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.InnerExcept ion Is Nothing)
> Response.Write( "--------------------------------")
> Response.Write( ("The following InnerException reported: "
> + ex.InnerExcepti on.ToString()))
> ex = ex.InnerExcepti on
> End While
> End Try
> End If
> End Sub
> </script>
>
> The HTML that follows this code snippet is not pasted.
>

Mar 2 '06 #7
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...s&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
18:28:41 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:28:41 130.126.83.20 GET /favicon.ico 404
18:29:24 130.126.83.20 GET /sendmail/vmailman.aspx 200
18:29:24 130.126.83.20 GET /favicon.ico 404
18:29:43 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:29:43 130.126.83.20 GET /favicon.ico 404
18:31:35 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:31:35 130.126.83.20 GET /favicon.ico 404
18:31:39 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:31:39 130.126.83.20 GET /favicon.ico 404
18:31:41 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:31:41 130.126.83.20 GET /favicon.ico 404
18:31:42 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:31:42 130.126.83.20 GET /favicon.ico 404
18:34:02 130.126.83.20 GET /sendmail/vmailman.aspx 200
18:34:02 130.126.83.20 GET /favicon.ico 404
18:34:18 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:34:18 130.126.83.20 GET /favicon.ico 404
18:44:53 130.126.83.20 GET /sendmail/vmailman.aspx 200
18:44:53 130.126.83.20 GET /favicon.ico 404
18:45:42 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:45:42 130.126.83.20 GET /favicon.ico 404
18:48:01 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:48:01 130.126.83.20 GET /favicon.ico 404
18:50:32 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:50:32 130.126.83.20 GET /favicon.ico 404
18:51:09 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:51:09 130.126.83.20 GET /favicon.ico 404
18:51:10 130.126.83.20 POST /sendmail/vmailman.aspx 200
18:51:10 130.126.83.20 GET /favicon.ico 404
19:06:51 130.126.83.20 POST /sendmail/vmailman.aspx 200
19:06:51 130.126.83.20 GET /favicon.ico 404
22:30:59 194.72.238.61 HEAD /iisstart.asp 200

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\sys tem32\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/
=============== =============== =====
<an***********@ yahoo.com> wrote in message
news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
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)
<an***********@ yahoo.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
> 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="Syst em.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.Fro m = txtFrom.Text
> mailMessage.To = txtTo.Text
> mailMessage.Cc = txtCc.Text
> mailMessage.Sub ject = "Test SMTP Message Send using port"
> mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
> SmtpMail.SmtpSe rver = "127.0.0.1"
>
> Try
> SmtpMail.Send(m ailMessage)
> 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.InnerExcept ion Is Nothing)
> Response.Write( "--------------------------------")
> Response.Write( ("The following InnerException reported: "
> + ex.InnerExcepti on.ToString()))
> ex = ex.InnerExcepti on
> End While
> End Try
> End If
> End Sub
> </script>
>
> The HTML that follows this code snippet is not pasted.
>


Mar 3 '06 #8
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%\syste m32\LogFiles\W3 SVC1 ),
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%\syste m32\LogFiles\sm tpsvc1 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/
=============== =============== =====
<an***********@ yahoo.com> wrote in message
news:11******** ************@u7 2g2000cwu.googl egroups.com...
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...s&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\sys tem32\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/
=============== =============== =====
<an***********@ yahoo.com> wrote in message
news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
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)
<an***********@ yahoo.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
> 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="Syst em.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.Fro m = txtFrom.Text
> mailMessage.To = txtTo.Text
> mailMessage.Cc = txtCc.Text
> mailMessage.Sub ject = "Test SMTP Message Send using port"
> mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
> SmtpMail.SmtpSe rver = "127.0.0.1"
>
> Try
> SmtpMail.Send(m ailMessage)
> 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.InnerExcept ion Is Nothing)
> Response.Write( "--------------------------------")
> Response.Write( ("The following InnerException reported: "
> + ex.InnerExcepti on.ToString()))
> ex = ex.InnerExcepti on
> End While
> End Try
> End If
> End Sub
> </script>
>
> The HTML that follows this code snippet is not pasted.
>

Mar 3 '06 #9
Yes, I did notice that I was showing you something different from what
you wanted.

But I do not have anything under LogFiles except W3SVC1.

I probably did not check the log option for my virtual SMTP server.
Will have to do it tomorrow. I don't have access to my server right
now.

Thanks for your kindness.

Juan T. Llibre wrote:
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%\syste m32\LogFiles\W3 SVC1 ),
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%\syste m32\LogFiles\sm tpsvc1 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/
=============== =============== =====
<an***********@ yahoo.com> wrote in message
news:11******** ************@u7 2g2000cwu.googl egroups.com...
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...s&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\sys tem32\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/
=============== =============== =====
<an***********@ yahoo.com> wrote in message
news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
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)
>
>
> <an***********@ yahoo.com> wrote in message
> news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
> > 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 SBCDSL
> > 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="Syst em.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.Fro m = txtFrom.Text
> > mailMessage.To = txtTo.Text
> > mailMessage.Cc = txtCc.Text
> > mailMessage.Sub ject = "Test SMTP Message Send using port"
> > mailMessage.Bod y = txtName.Text & ", " &txtComments.Te xt
> > SmtpMail.SmtpSe rver = "127.0.0.1"
> >
> > Try
> > SmtpMail.Send(m ailMessage)
> > 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.InnerExcept ion Is Nothing)
> > Response.Write( "--------------------------------")
> > Response.Write( ("The following InnerException reported: "
> > + ex.InnerExcepti on.ToString()))
> > ex = ex.InnerExcepti on
> > End While
> > End Try
> > End If
> > End Sub
> > </script>
> >
> > The HTML that follows this code snippet is not pasted.
> >


Mar 3 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
14059
bonski
by: bonski | last post by:
hello everybody.. i just want to know what this error means... Error: mail() : SMTP server response: 501 #5.1.1 bad address the smtp set up was correct.. valid emails... and port. so im just wondering why this error still occurs. looking forward for your suggestions.. thanks!
8
28254
by: punitshrivastava | last post by:
Hi to All. I am Punit .I am back with new question .Please help me. I want to create one enquiry form in php.for this I code it: form code: <form name="enquiry" method="post" action="enquiry.php">
2
6736
by: Ronald Raygun | last post by:
I am calling the mail() function in a PHP script and I get the ff error: Warning: mail() : SMTP server response: 501 5.5.4 Invalid Address in C:\test\test.php on line 394 Relevant Info: OS: Win2k Web Server Apache: v2.2.8
8
3324
by: aradhanathawait | last post by:
I tried a lot to send email from my gmail id using the smtp server of gmail.com but I am getting request time out error. I increased the execution time in web.config then also getting the same error. Please help me. Thanx n Regards, Aradhana
0
8966
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9467
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9257
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9204
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6749
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4567
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3278
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.