|
Home > Archive > IIS and SMTP > July 2004 > smtp virtual server not sending messages anymore?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
smtp virtual server not sending messages anymore?
|
|
|
| Hello,
A few months ago I was practicing sending an email from an
smtp virtual server running on a win2k server with iis5.0
running. I was practicing using aspx. This was working.
Then I put it down for a while, but now I want to use it
again and I keep getting this error message in the bad
mail directory:
[vbcol=seagreen]
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.
j.smith@smith.com
<<
we'll say that j.smith@smith.com is a valid email domain.
Here is the code that I am using in aspx:
------------------------------------------
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Web.Mail"%>
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
Dim EMail As New MailMessage()
'fully qualified domain name is
cnfrkccmc001.cn.msds.kp.org
EMail.To = "j.smith@smith.com"
EMail.From = "j.smith@smith.com"
EMail.Cc = "jsmith@aol.com"
EMail.Subject = "Test Email"
EMail.Body = "Here is the body of our email"
SmtpMail.SmtpServer = "localhost" '<-- this one not
getting error message
'SmtpMail.SmtpServer = "cnfrkccmc001.cn.msds.kp.org" '<-
-this one not getting error message
'SmtpMail.SmtpServer = "10.246.66.251" '<--doesn't
work :-( <-- this is the preferred DNS server
'SmtpMail.SmtpServer = "10.237.99.226" '<--this one not
getting error message
Try
SmtpMail.Send(EMail)
Span1.InnerHtml = "Mail Sent!"
Catch exc As Exception
Response.Write("Send mail failure: " + exc.ToString())
End Try
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Button id="Button1" onclick="Button1_Click"
runat="server" Width="89px" Text="Send Email"></asp:Button>
<span id=Span1 style="font: 8pt verdana;"
runat="server" />
</form>
</body>
</html>
------------------------------------------------
Any suggestions? Do I need to set/re-set something in the
smtp server or IIS? BTW, can I create an email domain on
this server so that it can receive emails? How can I do
that?
Thanks,
Tippe
| |
| Kristofer Gafvert 2004-07-28, 6:18 pm |
| Hello,
Does your Event Log tell you anything?
It is:
Start->Run, eventvwr.msc
--
Regards,
Kristofer Gafvert - IIS MVP
http://www.ilopia.com - When you need help!
"tippe" <anonymous@discussions.microsoft.com> wrote in message
news:534801c4741b$f20cca40$a601280a@phx.gbl...
> Hello,
>
> A few months ago I was practicing sending an email from an
> smtp virtual server running on a win2k server with iis5.0
> running. I was practicing using aspx. This was working.
> Then I put it down for a while, but now I want to use it
> again and I keep getting this error message in the bad
> mail directory:
>
> 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.
> j.smith@smith.com
> <<
>
> we'll say that j.smith@smith.com is a valid email domain.
>
> Here is the code that I am using in aspx:
> ------------------------------------------
> <%@ Page Language="VB" %>
> <%@ Import Namespace="System.Web.Mail"%>
> <script runat="server">
>
>
> Sub Button1_Click(sender As Object, e As EventArgs)
> Dim EMail As New MailMessage()
> 'fully qualified domain name is
> cnfrkccmc001.cn.msds.kp.org
> EMail.To = "j.smith@smith.com"
> EMail.From = "j.smith@smith.com"
> EMail.Cc = "jsmith@aol.com"
> EMail.Subject = "Test Email"
> EMail.Body = "Here is the body of our email"
> SmtpMail.SmtpServer = "localhost" '<-- this one not
> getting error message
> 'SmtpMail.SmtpServer = "cnfrkccmc001.cn.msds.kp.org" '<-
> -this one not getting error message
> 'SmtpMail.SmtpServer = "10.246.66.251" '<--doesn't
> work :-( <-- this is the preferred DNS server
> 'SmtpMail.SmtpServer = "10.237.99.226" '<--this one not
> getting error message
> Try
> SmtpMail.Send(EMail)
> Span1.InnerHtml = "Mail Sent!"
> Catch exc As Exception
> Response.Write("Send mail failure: " + exc.ToString())
> End Try
> End Sub
>
> </script>
> <html>
> <head>
> </head>
> <body>
> <form runat="server">
> <asp:Button id="Button1" onclick="Button1_Click"
> runat="server" Width="89px" Text="Send Email"></asp:Button>
> <span id=Span1 style="font: 8pt verdana;"
> runat="server" />
> </form>
> </body>
> </html>
> ------------------------------------------------
>
> Any suggestions? Do I need to set/re-set something in the
> smtp server or IIS? BTW, can I create an email domain on
> this server so that it can receive emails? How can I do
> that?
>
> Thanks,
> Tippe
>
>
>
>
>
| |
|
| For all the attempts I made, the eventviewer said this:
Information
....
Source: smtpsvc
Description:
Virtual Server: the drop directory, for * could not be
created.
But in the mailroot directory, there is already a drop
subdirectory. In any event, a coworker pointed out that
it is only a virtual server and gave me an actual smtp
server name to use which does work for my app. However, I
have a new question (because before I was able to send
mail directly from this server and now I can't).
I added the name of the smtp server to the smart host
window in the Deliver/Advanced tab of the Default SMTP
Virtual Server Properties. But I still can't send mail
when I reference this server by IPaddress, domain name, or
DNS server IP address. I also went into
IIS/Properties/server extensions/settings and set the name
of the smtp server the coworker gave me in the SMTP Mail
Server window, but alas! I still can't reference my
server to send out email. I can only reference the smtp
server to successfully send email from my app. Is there a
way to alias this smtp server in my default smtp virtual
sever so that I can send emails with my IPaddress?
Thanks,
T
>-----Original Message-----
>Hello,
>
>Does your Event Log tell you anything?
>It is:
>
>Start->Run, eventvwr.msc
>
>--
>Regards,
>Kristofer Gafvert - IIS MVP
>http://www.ilopia.com - When you need help!
>
>
>"tippe" <anonymous@discussions.microsoft.com> wrote in
message
>news:534801c4741b$f20cca40$a601280a@phx.gbl...
an[vbcol=seagreen]
iis5.0[vbcol=seagreen]
working.[vbcol=seagreen]
domain.[vbcol=seagreen]
= "cnfrkccmc001.cn.msds.kp.org" '<-[vbcol=seagreen]
not[vbcol=seagreen]
())[vbcol=seagreen]
Email"></asp:Button>[vbcol=seagreen]
the[vbcol=seagreen]
on[vbcol=seagreen]
>
>
>.
>
|
|
|
|
|