Email not working

T

tshad

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
T

tshad

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 = "(e-mail address removed)"
message.From = "(e-mail address removed)"
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
 
G

Guest

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!
***************************
 
T

tshad

Cowboy (Gregory A. Beamer) - MVP said:
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 said:
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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
J

Juan T. Llibre

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.





tshad said:
"Cowboy (Gregory A. Beamer) - MVP" <[email protected]>
wrote in message
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 said:
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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
T

tshad

Juan T. Llibre said:
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
tshad said:
"Cowboy (Gregory A. Beamer) - MVP" <[email protected]>
wrote in message
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!
***************************


:

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
T

tshad

tshad said:
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
tshad said:
"Cowboy (Gregory A. Beamer) - MVP" <[email protected]>
wrote in message
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!
***************************


:

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
J

Juan T. Llibre

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.






tshad said:
tshad said:
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
"Cowboy (Gregory A. Beamer) - MVP" <[email protected]>
wrote in message
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!
***************************


:

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
T

tshad

Juan T. Llibre said:
re:

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
tshad said:
tshad said:
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





"Cowboy (Gregory A. Beamer) - MVP" <[email protected]>
wrote in message
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!
***************************


:

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
J

Juan T. Llibre

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.







tshad said:
Juan T. Llibre said:
re:

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
tshad said:
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





"Cowboy (Gregory A. Beamer) - MVP"
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!
***************************


:

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
T

tshad

Juan T. Llibre said:
re:

Good! You're halfway there!

re:

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.







tshad said:
Juan T. Llibre said:
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
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





"Cowboy (Gregory A. Beamer) - MVP"
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!
***************************


:

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 
J

Juan T. Llibre

re:
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 ?

;-)








tshad said:
Juan T. Llibre said:
re:

Good! You're halfway there!

re:

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.







tshad said:
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






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





"Cowboy (Gregory A. Beamer) - MVP"
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!
***************************


:

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 (e-mail address removed)"

My trace is showing:

"Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object 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\emailtest.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 (e-mail address removed) is my personal email.

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top