Using System.Web to Mail messaging in VB.NET/C#.Net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using the objects in System.Web, I am able to send email to internal email
address using VB or C#.net.

But,if I try to send an email to an external email address, I receive this
message:

An unhandled exception of type 'System.Web.HttpException' occurred in
system.web.dll

Additional information: Could not access 'CDO.Message' object.
 
Hi Roger,

This error message is somewhat misleading. While there is a very small
chance that the ASPNET user cannot access the DLL, the more likely scenario
is related to the actual connect to the SMTP server specified in the
application settings.

To remedy the situation, follow these steps to open your SMTP server for
relaying.

If using Microsoft's SMTP Server, open the properties on your SMTP Server
and go the the "Access" tab. Press the "Relay" button, change the option to
"All except the list below" and clear any options in the list. Then press OK.
If this remedies the problem, this means that your normal settings do not
allow the "From Address" that was specified to send emails through the
server.

While you do not want to leave your server completely open for SMTP relay,
you can safely add the IP address of your web server and set it to use the
"Only the list below" option.

If this does not remedy the problem, we recommend that you confirm the
following:
- That you are using a valid email address for the from and the to addresses.
- Confirm that you are able to connect to the SMTP server. Use a telnet
client and connect to port 25 to test.


regards,
Bhavesh Patel
 
I think my problem closely resembles Suggestion 4. Cause I know I can send
internally, but externally I can't. Now, how do I configure exchange server
to allow me to relay messages.
 
Back
Top