By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

Email not working

P: n/a
I have a W2003 server running my website and I am trying to set up my pages
to send email using System.Web.Mail.

I have pages running on this machine using CDONTS that work fine.

I am using our exchange server to send the mail but am getting an "Unable to
relay" message. But the "From" name is my email address, which is obviously
on our exchange server, so there is no relay.

The message I get back is:

"The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()"

Am I missing something here?

The ts*********@yahoo.com is my personal email.

Thanks,

Tom
Nov 19 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Sorry,

I forgot to add the code:

*************************************************
<%@ Page Language="VB" trace="true" debug="true" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ Import Namespace="System.Web.Mail" %>

<html>
<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
Dim Message As New MailMessage()
message.To = "ts**********@yahoo.com"
message.From = "tf*@fsc.com"
message.Subject = "This is a test"
message.Body = "This is the body"
message.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "email.ftsolutions.com"
smtpMail.Send(message)
End Sub
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Submit Resume</title>
</head>
<link href="staffing.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
</html>
************************************************** **********

Thanks,

Tom
"tshad" <ts**********@ftsolutions.com> wrote in message
news:u1****************@TK2MSFTNGP12.phx.gbl...
I have a W2003 server running my website and I am trying to set up my pages
to send email using System.Web.Mail.

I have pages running on this machine using CDONTS that work fine.

I am using our exchange server to send the mail but am getting an "Unable
to relay" message. But the "From" name is my email address, which is
obviously on our exchange server, so there is no relay.

The message I get back is:

"The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()"

Am I missing something here?

The ts*********@yahoo.com is my personal email.

Thanks,

Tom

Nov 19 '05 #2

P: n/a
Exchange, by default, only relays from the domain it sits on. There are two
options:

1. Allow your domain (yahoo.com) to be added.
2. Allow all relays from the IP address of the web server (better option,
for security).
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"tshad" wrote:
I have a W2003 server running my website and I am trying to set up my pages
to send email using System.Web.Mail.

I have pages running on this machine using CDONTS that work fine.

I am using our exchange server to send the mail but am getting an "Unable to
relay" message. But the "From" name is my email address, which is obviously
on our exchange server, so there is no relay.

The message I get back is:

"The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()"

Am I missing something here?

The ts*********@yahoo.com is my personal email.

Thanks,

Tom

Nov 19 '05 #3

P: n/a
"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:4C**********************************@microsof t.com...
Exchange, by default, only relays from the domain it sits on. There are
two
options:

1. Allow your domain (yahoo.com) to be added.
2. Allow all relays from the IP address of the web server (better option,
for security).
But why is CDONTS working?

Is it being sent from the Windows 2003 server instead of the Exchange
Server?

If this is the case, how do I tell System.Web.Mail to send it the same way?

Which would be better?

Thanks,

Tom


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"tshad" wrote:
I have a W2003 server running my website and I am trying to set up my
pages
to send email using System.Web.Mail.

I have pages running on this machine using CDONTS that work fine.

I am using our exchange server to send the mail but am getting an "Unable
to
relay" message. But the "From" name is my email address, which is
obviously
on our exchange server, so there is no relay.

The message I get back is:

"The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()"

Am I missing something here?

The ts*********@yahoo.com is my personal email.

Thanks,

Tom

Nov 19 '05 #4

P: n/a
You could setup an smtp service in your W2K3 Server,
and use *that* to forward your emails, instead of
using your Exchange Server to relay the emails.

It's pretty straightforward...and works like a charm.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eq****************@TK2MSFTNGP14.phx.gbl...
"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM>
wrote in message
news:4C**********************************@microsof t.com...
Exchange, by default, only relays from the domain it sits on. There are
two
options:

1. Allow your domain (yahoo.com) to be added.
2. Allow all relays from the IP address of the web server (better option,
for security).


But why is CDONTS working?

Is it being sent from the Windows 2003 server instead of the Exchange
Server?

If this is the case, how do I tell System.Web.Mail to send it the same
way?

Which would be better?

Thanks,

Tom


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"tshad" wrote:
I have a W2003 server running my website and I am trying to set up my
pages
to send email using System.Web.Mail.

I have pages running on this machine using CDONTS that work fine.

I am using our exchange server to send the mail but am getting an
"Unable to
relay" message. But the "From" name is my email address, which is
obviously
on our exchange server, so there is no relay.

The message I get back is:

"The server rejected one or more recipient addresses. The server
response
was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()"

Am I missing something here?

The ts*********@yahoo.com is my personal email.

Thanks,

Tom


Nov 19 '05 #5

P: n/a
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OK**************@tk2msftngp13.phx.gbl...
You could setup an smtp service in your W2K3 Server,
and use *that* to forward your emails, instead of
using your Exchange Server to relay the emails.

It's pretty straightforward...and works like a charm.
If CDONTS is working, would it already be doing that?

Also, what would I put in my SmtpMail.SmtpServer field?

Thanks,

Tom
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eq****************@TK2MSFTNGP14.phx.gbl...
"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM>
wrote in message
news:4C**********************************@microsof t.com...
Exchange, by default, only relays from the domain it sits on. There are
two
options:

1. Allow your domain (yahoo.com) to be added.
2. Allow all relays from the IP address of the web server (better
option,
for security).


But why is CDONTS working?

Is it being sent from the Windows 2003 server instead of the Exchange
Server?

If this is the case, how do I tell System.Web.Mail to send it the same
way?

Which would be better?

Thanks,

Tom


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"tshad" wrote:

I have a W2003 server running my website and I am trying to set up my
pages
to send email using System.Web.Mail.

I have pages running on this machine using CDONTS that work fine.

I am using our exchange server to send the mail but am getting an
"Unable to
relay" message. But the "From" name is my email address, which is
obviously
on our exchange server, so there is no relay.

The message I get back is:

"The server rejected one or more recipient addresses. The server
response
was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()"

Am I missing something here?

The ts*********@yahoo.com is my personal email.

Thanks,

Tom



Nov 19 '05 #6

P: n/a
"tshad" <ts**********@ftsolutions.com> wrote in message
news:ek*************@TK2MSFTNGP12.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OK**************@tk2msftngp13.phx.gbl...
You could setup an smtp service in your W2K3 Server,
and use *that* to forward your emails, instead of
using your Exchange Server to relay the emails.

It's pretty straightforward...and works like a charm.
If CDONTS is working, would it already be doing that?

Also, what would I put in my SmtpMail.SmtpServer field?


I tried setting it to:

SmtpMail.SmtpServer = "127.0.0.1"

But that didn't work.

Tom
Thanks,

Tom

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eq****************@TK2MSFTNGP14.phx.gbl...
"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM>
wrote in message
news:4C**********************************@microsof t.com...
Exchange, by default, only relays from the domain it sits on. There are
two
options:

1. Allow your domain (yahoo.com) to be added.
2. Allow all relays from the IP address of the web server (better
option,
for security).

But why is CDONTS working?

Is it being sent from the Windows 2003 server instead of the Exchange
Server?

If this is the case, how do I tell System.Web.Mail to send it the same
way?

Which would be better?

Thanks,

Tom

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"tshad" wrote:

> I have a W2003 server running my website and I am trying to set up my
> pages
> to send email using System.Web.Mail.
>
> I have pages running on this machine using CDONTS that work fine.
>
> I am using our exchange server to send the mail but am getting an
> "Unable to
> relay" message. But the "From" name is my email address, which is
> obviously
> on our exchange server, so there is no relay.
>
> The message I get back is:
>
> "The server rejected one or more recipient addresses. The server
> response
> was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"
>
> My trace is showing:
>
> "Could not access 'CDO.Message' object.
> at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
> String
> methodName, Object[] args)
> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
> at System.Web.Mail.SmtpMail.Send(MailMessage message)
> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
> C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
> at System.Web.UI.Control.OnLoad(EventArgs e)
> at System.Web.UI.Control.LoadRecursive()
> at System.Web.UI.Page.ProcessRequestMain()"
>
> Am I missing something here?
>
> The ts*********@yahoo.com is my personal email.
>
> Thanks,
>
> Tom
>
>
>



Nov 19 '05 #7

P: n/a
re:
I tried setting it to:
SmtpMail.SmtpServer = "127.0.0.1"
But that didn't work.
Did you set up the smtp server service ?
If you didn't, that can't work.

I set up an smtp service, and assigned it the same
name as my domain name, and it works all the time.

Click your Start button, hit the "Help and Support" link,
and search for "install smtp service" when the Help and
Support Center opens.

When the search ends, You should see several links
with the information you need to setup the smtp service.

Follow the instructions...

Hint: you don't actually need to run the POP3
service, although if you want to, you certainly can.

What I did is that, after installing the POP3 and SMTP services,
since I didn't want to run a full mail server, I uninstalled the
POP3 service, *but left the SMTP service running*.

Let us know if you run into trouble doing that.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:u9*************@TK2MSFTNGP09.phx.gbl... "tshad" <ts**********@ftsolutions.com> wrote in message
news:ek*************@TK2MSFTNGP12.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OK**************@tk2msftngp13.phx.gbl...
You could setup an smtp service in your W2K3 Server,
and use *that* to forward your emails, instead of
using your Exchange Server to relay the emails.

It's pretty straightforward...and works like a charm.


If CDONTS is working, would it already be doing that?

Also, what would I put in my SmtpMail.SmtpServer field?


I tried setting it to:

SmtpMail.SmtpServer = "127.0.0.1"

But that didn't work.

Tom

Thanks,

Tom

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eq****************@TK2MSFTNGP14.phx.gbl...
"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM>
wrote in message
news:4C**********************************@microsof t.com...
> Exchange, by default, only relays from the domain it sits on. There
> are two
> options:
>
> 1. Allow your domain (yahoo.com) to be added.
> 2. Allow all relays from the IP address of the web server (better
> option,
> for security).

But why is CDONTS working?

Is it being sent from the Windows 2003 server instead of the Exchange
Server?

If this is the case, how do I tell System.Web.Mail to send it the same
way?

Which would be better?

Thanks,

Tom

>
>
> ---
>
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ***************************
> Think Outside the Box!
> ***************************
>
>
> "tshad" wrote:
>
>> I have a W2003 server running my website and I am trying to set up my
>> pages
>> to send email using System.Web.Mail.
>>
>> I have pages running on this machine using CDONTS that work fine.
>>
>> I am using our exchange server to send the mail but am getting an
>> "Unable to
>> relay" message. But the "From" name is my email address, which is
>> obviously
>> on our exchange server, so there is no relay.
>>
>> The message I get back is:
>>
>> "The server rejected one or more recipient addresses. The server
>> response
>> was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"
>>
>> My trace is showing:
>>
>> "Could not access 'CDO.Message' object.
>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
>> String
>> methodName, Object[] args)
>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
>> C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line 15
>> at System.Web.UI.Control.OnLoad(EventArgs e)
>> at System.Web.UI.Control.LoadRecursive()
>> at System.Web.UI.Page.ProcessRequestMain()"
>>
>> Am I missing something here?
>>
>> The ts*********@yahoo.com is my personal email.
>>
>> Thanks,
>>
>> Tom
>>
>>
>>



Nov 19 '05 #8

P: n/a
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ef**************@TK2MSFTNGP10.phx.gbl...
re:
I tried setting it to:
SmtpMail.SmtpServer = "127.0.0.1"
But that didn't work.
Did you set up the smtp server service ?
If you didn't, that can't work.


I looked and it was already set up and running.

It was set up with the name "Simple Mail Transfer Protocol (SMTP)".

It was logged on as a Local System Account.

I set up an smtp service, and assigned it the same
name as my domain name, and it works all the time.

Click your Start button, hit the "Help and Support" link,
and search for "install smtp service" when the Help and
Support Center opens.

When the search ends, You should see several links
with the information you need to setup the smtp service.

Follow the instructions...

Hint: you don't actually need to run the POP3
service, although if you want to, you certainly can.
I don't need need POP3, I only need to be able to send from my Web Server.

What I did is that, after installing the POP3 and SMTP services,
since I didn't want to run a full mail server, I uninstalled the
POP3 service, *but left the SMTP service running*.

Let us know if you run into trouble doing that.
It still doesn't work. I don't want to change the name as I don't know how
that would affect the other programs using CDONTS.

Tom

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:u9*************@TK2MSFTNGP09.phx.gbl...
"tshad" <ts**********@ftsolutions.com> wrote in message
news:ek*************@TK2MSFTNGP12.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OK**************@tk2msftngp13.phx.gbl...
You could setup an smtp service in your W2K3 Server,
and use *that* to forward your emails, instead of
using your Exchange Server to relay the emails.

It's pretty straightforward...and works like a charm.

If CDONTS is working, would it already be doing that?

Also, what would I put in my SmtpMail.SmtpServer field?


I tried setting it to:

SmtpMail.SmtpServer = "127.0.0.1"

But that didn't work.

Tom

Thanks,

Tom

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eq****************@TK2MSFTNGP14.phx.gbl...
> "Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM>
> wrote in message
> news:4C**********************************@microsof t.com...
>> Exchange, by default, only relays from the domain it sits on. There
>> are two
>> options:
>>
>> 1. Allow your domain (yahoo.com) to be added.
>> 2. Allow all relays from the IP address of the web server (better
>> option,
>> for security).
>
> But why is CDONTS working?
>
> Is it being sent from the Windows 2003 server instead of the Exchange
> Server?
>
> If this is the case, how do I tell System.Web.Mail to send it the same
> way?
>
> Which would be better?
>
> Thanks,
>
> Tom
>
>>
>>
>> ---
>>
>> Gregory A. Beamer
>> MVP; MCP: +I, SE, SD, DBA
>>
>> ***************************
>> Think Outside the Box!
>> ***************************
>>
>>
>> "tshad" wrote:
>>
>>> I have a W2003 server running my website and I am trying to set up
>>> my pages
>>> to send email using System.Web.Mail.
>>>
>>> I have pages running on this machine using CDONTS that work fine.
>>>
>>> I am using our exchange server to send the mail but am getting an
>>> "Unable to
>>> relay" message. But the "From" name is my email address, which is
>>> obviously
>>> on our exchange server, so there is no relay.
>>>
>>> The message I get back is:
>>>
>>> "The server rejected one or more recipient addresses. The server
>>> response
>>> was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"
>>>
>>> My trace is showing:
>>>
>>> "Could not access 'CDO.Message' object.
>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
>>> String
>>> methodName, Object[] args)
>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
>>> C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line
>>> 15
>>> at System.Web.UI.Control.OnLoad(EventArgs e)
>>> at System.Web.UI.Control.LoadRecursive()
>>> at System.Web.UI.Page.ProcessRequestMain()"
>>>
>>> Am I missing something here?
>>>
>>> The ts*********@yahoo.com is my personal email.
>>>
>>> Thanks,
>>>
>>> Tom
>>>
>>>
>>>
>
>



Nov 19 '05 #9

P: n/a
re:
I looked and it was already set up and running.
It was set up with the name "Simple Mail Transfer Protocol (SMTP)".
Good! You're halfway there!

re: SmtpMail.SmtpServer = "127.0.0.1"
Try using "localhost", instead of "127.0.0.1"

Also, you could try to use the default domain name
for the smtp server ( Open the smtp server's properties
in the IIS MMC, and see what the default domain name is.
Then, use *that* name, instead of "127.0.0.1" or "localhost")

Warning: some mail servers reject single-name smtp server
aliases. They only accept full domain names ( domainname.com ).

Do you have a registered domain name for your server ?

If you do, just create a new smtp domain,
and assign it your domain name.

Not to worry, there won't be a name conflict.

re: It still doesn't work. I don't want to change the name as I don't know
how that would affect the other programs using CDONTS.
You don't have to change the name of the existing smtp server.

You can create as many aliases as you want to.
Open the IIS MMC, select the default smtp server,
expand the tree, select "Domain", right-click "Domains",
and select "New" --> Domain.

Then configure it as you see fit.

The current domain will continue to work as usual.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uo**************@TK2MSFTNGP10.phx.gbl... "Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ef**************@TK2MSFTNGP10.phx.gbl...
re:
I tried setting it to:
SmtpMail.SmtpServer = "127.0.0.1"
But that didn't work.


Did you set up the smtp server service ?
If you didn't, that can't work.


I looked and it was already set up and running.

It was set up with the name "Simple Mail Transfer Protocol (SMTP)".

It was logged on as a Local System Account.

I set up an smtp service, and assigned it the same
name as my domain name, and it works all the time.

Click your Start button, hit the "Help and Support" link,
and search for "install smtp service" when the Help and
Support Center opens.

When the search ends, You should see several links
with the information you need to setup the smtp service.

Follow the instructions...

Hint: you don't actually need to run the POP3
service, although if you want to, you certainly can.


I don't need need POP3, I only need to be able to send from my Web Server.

What I did is that, after installing the POP3 and SMTP services,
since I didn't want to run a full mail server, I uninstalled the
POP3 service, *but left the SMTP service running*.

Let us know if you run into trouble doing that.


It still doesn't work. I don't want to change the name as I don't know
how that would affect the other programs using CDONTS.

Tom


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:u9*************@TK2MSFTNGP09.phx.gbl...
"tshad" <ts**********@ftsolutions.com> wrote in message
news:ek*************@TK2MSFTNGP12.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OK**************@tk2msftngp13.phx.gbl...
> You could setup an smtp service in your W2K3 Server,
> and use *that* to forward your emails, instead of
> using your Exchange Server to relay the emails.
>
> It's pretty straightforward...and works like a charm.

If CDONTS is working, would it already be doing that?

Also, what would I put in my SmtpMail.SmtpServer field?

I tried setting it to:

SmtpMail.SmtpServer = "127.0.0.1"

But that didn't work.

Tom

Thanks,

Tom
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Español
> =====================
>
> "tshad" <ts**********@ftsolutions.com> wrote in message
> news:eq****************@TK2MSFTNGP14.phx.gbl...
>> "Cowboy (Gregory A. Beamer) - MVP"
>> <No************@comcast.netNoSpamM> wrote in message
>> news:4C**********************************@microsof t.com...
>>> Exchange, by default, only relays from the domain it sits on. There
>>> are two
>>> options:
>>>
>>> 1. Allow your domain (yahoo.com) to be added.
>>> 2. Allow all relays from the IP address of the web server (better
>>> option,
>>> for security).
>>
>> But why is CDONTS working?
>>
>> Is it being sent from the Windows 2003 server instead of the Exchange
>> Server?
>>
>> If this is the case, how do I tell System.Web.Mail to send it the
>> same way?
>>
>> Which would be better?
>>
>> Thanks,
>>
>> Tom
>>
>>>
>>>
>>> ---
>>>
>>> Gregory A. Beamer
>>> MVP; MCP: +I, SE, SD, DBA
>>>
>>> ***************************
>>> Think Outside the Box!
>>> ***************************
>>>
>>>
>>> "tshad" wrote:
>>>
>>>> I have a W2003 server running my website and I am trying to set up
>>>> my pages
>>>> to send email using System.Web.Mail.
>>>>
>>>> I have pages running on this machine using CDONTS that work fine.
>>>>
>>>> I am using our exchange server to send the mail but am getting an
>>>> "Unable to
>>>> relay" message. But the "From" name is my email address, which is
>>>> obviously
>>>> on our exchange server, so there is no relay.
>>>>
>>>> The message I get back is:
>>>>
>>>> "The server rejected one or more recipient addresses. The server
>>>> response
>>>> was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"
>>>>
>>>> My trace is showing:
>>>>
>>>> "Could not access 'CDO.Message' object.
>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
>>>> String
>>>> methodName, Object[] args)
>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line
>>>> 15
>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
>>>> at System.Web.UI.Control.LoadRecursive()
>>>> at System.Web.UI.Page.ProcessRequestMain()"
>>>>
>>>> Am I missing something here?
>>>>
>>>> The ts*********@yahoo.com is my personal email.
>>>>
>>>> Thanks,
>>>>
>>>> Tom
>>>>
>>>>
>>>>
>>
>>
>
>



Nov 19 '05 #10

P: n/a
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
re:
I looked and it was already set up and running.
It was set up with the name "Simple Mail Transfer Protocol (SMTP)".
Good! You're halfway there!

re:
SmtpMail.SmtpServer = "127.0.0.1"


Try using "localhost", instead of "127.0.0.1"


That worked.

Why didn't 127.0.0.1?

Also, why didn't I have to do all this to get CDONTS to work?

Thanks,

Tom
Also, you could try to use the default domain name
for the smtp server ( Open the smtp server's properties
in the IIS MMC, and see what the default domain name is.
Then, use *that* name, instead of "127.0.0.1" or "localhost")

Warning: some mail servers reject single-name smtp server
aliases. They only accept full domain names ( domainname.com ).

Do you have a registered domain name for your server ?

If you do, just create a new smtp domain,
and assign it your domain name.

Not to worry, there won't be a name conflict.

re:
It still doesn't work. I don't want to change the name as I don't know
how that would affect the other programs using CDONTS.


You don't have to change the name of the existing smtp server.

You can create as many aliases as you want to.
Open the IIS MMC, select the default smtp server,
expand the tree, select "Domain", right-click "Domains",
and select "New" --> Domain.

Then configure it as you see fit.

The current domain will continue to work as usual.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uo**************@TK2MSFTNGP10.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ef**************@TK2MSFTNGP10.phx.gbl...
re:
I tried setting it to:
SmtpMail.SmtpServer = "127.0.0.1"
But that didn't work.

Did you set up the smtp server service ?
If you didn't, that can't work.


I looked and it was already set up and running.

It was set up with the name "Simple Mail Transfer Protocol (SMTP)".

It was logged on as a Local System Account.

I set up an smtp service, and assigned it the same
name as my domain name, and it works all the time.

Click your Start button, hit the "Help and Support" link,
and search for "install smtp service" when the Help and
Support Center opens.

When the search ends, You should see several links
with the information you need to setup the smtp service.

Follow the instructions...

Hint: you don't actually need to run the POP3
service, although if you want to, you certainly can.


I don't need need POP3, I only need to be able to send from my Web
Server.

What I did is that, after installing the POP3 and SMTP services,
since I didn't want to run a full mail server, I uninstalled the
POP3 service, *but left the SMTP service running*.

Let us know if you run into trouble doing that.


It still doesn't work. I don't want to change the name as I don't know
how that would affect the other programs using CDONTS.

Tom


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:u9*************@TK2MSFTNGP09.phx.gbl...
"tshad" <ts**********@ftsolutions.com> wrote in message
news:ek*************@TK2MSFTNGP12.phx.gbl...
> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
> news:OK**************@tk2msftngp13.phx.gbl...
>> You could setup an smtp service in your W2K3 Server,
>> and use *that* to forward your emails, instead of
>> using your Exchange Server to relay the emails.
>>
>> It's pretty straightforward...and works like a charm.
>
> If CDONTS is working, would it already be doing that?
>
> Also, what would I put in my SmtpMail.SmtpServer field?

I tried setting it to:

SmtpMail.SmtpServer = "127.0.0.1"

But that didn't work.

Tom
>
> Thanks,
>
> Tom
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Español
>> =====================
>>
>> "tshad" <ts**********@ftsolutions.com> wrote in message
>> news:eq****************@TK2MSFTNGP14.phx.gbl...
>>> "Cowboy (Gregory A. Beamer) - MVP"
>>> <No************@comcast.netNoSpamM> wrote in message
>>> news:4C**********************************@microsof t.com...
>>>> Exchange, by default, only relays from the domain it sits on. There
>>>> are two
>>>> options:
>>>>
>>>> 1. Allow your domain (yahoo.com) to be added.
>>>> 2. Allow all relays from the IP address of the web server (better
>>>> option,
>>>> for security).
>>>
>>> But why is CDONTS working?
>>>
>>> Is it being sent from the Windows 2003 server instead of the
>>> Exchange Server?
>>>
>>> If this is the case, how do I tell System.Web.Mail to send it the
>>> same way?
>>>
>>> Which would be better?
>>>
>>> Thanks,
>>>
>>> Tom
>>>
>>>>
>>>>
>>>> ---
>>>>
>>>> Gregory A. Beamer
>>>> MVP; MCP: +I, SE, SD, DBA
>>>>
>>>> ***************************
>>>> Think Outside the Box!
>>>> ***************************
>>>>
>>>>
>>>> "tshad" wrote:
>>>>
>>>>> I have a W2003 server running my website and I am trying to set up
>>>>> my pages
>>>>> to send email using System.Web.Mail.
>>>>>
>>>>> I have pages running on this machine using CDONTS that work fine.
>>>>>
>>>>> I am using our exchange server to send the mail but am getting an
>>>>> "Unable to
>>>>> relay" message. But the "From" name is my email address, which is
>>>>> obviously
>>>>> on our exchange server, so there is no relay.
>>>>>
>>>>> The message I get back is:
>>>>>
>>>>> "The server rejected one or more recipient addresses. The server
>>>>> response
>>>>> was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"
>>>>>
>>>>> My trace is showing:
>>>>>
>>>>> "Could not access 'CDO.Message' object.
>>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
>>>>> String
>>>>> methodName, Object[] args)
>>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
>>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
>>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
>>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line
>>>>> 15
>>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
>>>>> at System.Web.UI.Control.LoadRecursive()
>>>>> at System.Web.UI.Page.ProcessRequestMain()"
>>>>>
>>>>> Am I missing something here?
>>>>>
>>>>> The ts*********@yahoo.com is my personal email.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Tom
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
>
>



Nov 19 '05 #11

P: n/a
re:
Try using "localhost", instead of "127.0.0.1" That worked.


Good! Glad to see you're up and running now!

re: Why didn't 127.0.0.1?
No idea...

On my server, neither "localhost" nor "127.0.0.1" work.
I *have* to use my domain name...or it doesn't work.
Also, why didn't I have to do all this to get CDONTS to work?
They want us to be on our toes ?

;-)


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uf*************@TK2MSFTNGP12.phx.gbl... "Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
re:
I looked and it was already set up and running.
It was set up with the name "Simple Mail Transfer Protocol (SMTP)".


Good! You're halfway there!

re:
SmtpMail.SmtpServer = "127.0.0.1"


Try using "localhost", instead of "127.0.0.1"


That worked.

Why didn't 127.0.0.1?

Also, why didn't I have to do all this to get CDONTS to work?

Thanks,

Tom

Also, you could try to use the default domain name
for the smtp server ( Open the smtp server's properties
in the IIS MMC, and see what the default domain name is.
Then, use *that* name, instead of "127.0.0.1" or "localhost")

Warning: some mail servers reject single-name smtp server
aliases. They only accept full domain names ( domainname.com ).

Do you have a registered domain name for your server ?

If you do, just create a new smtp domain,
and assign it your domain name.

Not to worry, there won't be a name conflict.

re:
It still doesn't work. I don't want to change the name as I don't know
how that would affect the other programs using CDONTS.


You don't have to change the name of the existing smtp server.

You can create as many aliases as you want to.
Open the IIS MMC, select the default smtp server,
expand the tree, select "Domain", right-click "Domains",
and select "New" --> Domain.

Then configure it as you see fit.

The current domain will continue to work as usual.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uo**************@TK2MSFTNGP10.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:ef**************@TK2MSFTNGP10.phx.gbl...
re:
> I tried setting it to:
> SmtpMail.SmtpServer = "127.0.0.1"
> But that didn't work.

Did you set up the smtp server service ?
If you didn't, that can't work.

I looked and it was already set up and running.

It was set up with the name "Simple Mail Transfer Protocol (SMTP)".

It was logged on as a Local System Account.
I set up an smtp service, and assigned it the same
name as my domain name, and it works all the time.

Click your Start button, hit the "Help and Support" link,
and search for "install smtp service" when the Help and
Support Center opens.

When the search ends, You should see several links
with the information you need to setup the smtp service.

Follow the instructions...

Hint: you don't actually need to run the POP3
service, although if you want to, you certainly can.

I don't need need POP3, I only need to be able to send from my Web
Server.
What I did is that, after installing the POP3 and SMTP services,
since I didn't want to run a full mail server, I uninstalled the
POP3 service, *but left the SMTP service running*.

Let us know if you run into trouble doing that.

It still doesn't work. I don't want to change the name as I don't know
how that would affect the other programs using CDONTS.

Tom


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:u9*************@TK2MSFTNGP09.phx.gbl...
> "tshad" <ts**********@ftsolutions.com> wrote in message
> news:ek*************@TK2MSFTNGP12.phx.gbl...
>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
>> news:OK**************@tk2msftngp13.phx.gbl...
>>> You could setup an smtp service in your W2K3 Server,
>>> and use *that* to forward your emails, instead of
>>> using your Exchange Server to relay the emails.
>>>
>>> It's pretty straightforward...and works like a charm.
>>
>> If CDONTS is working, would it already be doing that?
>>
>> Also, what would I put in my SmtpMail.SmtpServer field?
>
> I tried setting it to:
>
> SmtpMail.SmtpServer = "127.0.0.1"
>
> But that didn't work.
>
> Tom
>>
>> Thanks,
>>
>> Tom
>>>
>>>
>>>
>>> Juan T. Llibre
>>> ASP.NET MVP
>>> http://asp.net.do/foros/
>>> Foros de ASP.NET en Español
>>> =====================
>>>
>>> "tshad" <ts**********@ftsolutions.com> wrote in message
>>> news:eq****************@TK2MSFTNGP14.phx.gbl...
>>>> "Cowboy (Gregory A. Beamer) - MVP"
>>>> <No************@comcast.netNoSpamM> wrote in message
>>>> news:4C**********************************@microsof t.com...
>>>>> Exchange, by default, only relays from the domain it sits on.
>>>>> There are two
>>>>> options:
>>>>>
>>>>> 1. Allow your domain (yahoo.com) to be added.
>>>>> 2. Allow all relays from the IP address of the web server (better
>>>>> option,
>>>>> for security).
>>>>
>>>> But why is CDONTS working?
>>>>
>>>> Is it being sent from the Windows 2003 server instead of the
>>>> Exchange Server?
>>>>
>>>> If this is the case, how do I tell System.Web.Mail to send it the
>>>> same way?
>>>>
>>>> Which would be better?
>>>>
>>>> Thanks,
>>>>
>>>> Tom
>>>>
>>>>>
>>>>>
>>>>> ---
>>>>>
>>>>> Gregory A. Beamer
>>>>> MVP; MCP: +I, SE, SD, DBA
>>>>>
>>>>> ***************************
>>>>> Think Outside the Box!
>>>>> ***************************
>>>>>
>>>>>
>>>>> "tshad" wrote:
>>>>>
>>>>>> I have a W2003 server running my website and I am trying to set
>>>>>> up my pages
>>>>>> to send email using System.Web.Mail.
>>>>>>
>>>>>> I have pages running on this machine using CDONTS that work fine.
>>>>>>
>>>>>> I am using our exchange server to send the mail but am getting an
>>>>>> "Unable to
>>>>>> relay" message. But the "From" name is my email address, which
>>>>>> is obviously
>>>>>> on our exchange server, so there is no relay.
>>>>>>
>>>>>> The message I get back is:
>>>>>>
>>>>>> "The server rejected one or more recipient addresses. The server
>>>>>> response
>>>>>> was: 550 5.7.1 Unable to relay for ts**********@yahoo.com"
>>>>>>
>>>>>> My trace is showing:
>>>>>>
>>>>>> "Could not access 'CDO.Message' object.
>>>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
>>>>>> String
>>>>>> methodName, Object[] args)
>>>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
>>>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
>>>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
>>>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\ema iltest.aspx:line
>>>>>> 15
>>>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
>>>>>> at System.Web.UI.Control.LoadRecursive()
>>>>>> at System.Web.UI.Page.ProcessRequestMain()"
>>>>>>
>>>>>> Am I missing something here?
>>>>>>
>>>>>> The ts*********@yahoo.com is my personal email.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Nov 19 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.