Emailing using SMTP

G

Guest

Hi All,

Right now I am bogged down by an error message which I am not able to fix as
there are no straight forward solutions to be found in the Internet. I thank
you all in advance for your precious time.

I apologize if this is not the correct place to put my query.

I have an ASP.Net (C#) application. I have a forgot password page where I
need to send the user authentication details through email. I use the
following code snippet. It works from the development environment (Windows
XP/2000, IIS 5.1, .Net Framework 1.1) both from ASPX and code behind pages.

System.Web.Mail.SmtpMail.SmtpServer = client.smtpserver.net;

System.Web.Mail.SmtpMail.Send("(e-mail address removed)", "(e-mail address removed)", "Email
Subject", "Test Email Content");

But the above code has the following results in the production machine at
the client place (Windows 2003 Server, IIS 6.0, .Net Framework 1.1). I use
Valid SMTP address, From and To email addresses.

1. Works properly from ASPX page.
2. Throws error "Could not access 'CDO.Message' object." when used from code
behind page.

The production server has cdosys.dll and cdonts.dll registered.

Please let me know what is the root cause of the problem and how to solve
this issue. Also let me know whether the above code is the best way to send
emails.

Thanks for your time.
Ganesh K
 
G

Guest

Hi,

It works. It was a silly "\n" in my email that I used for line break.

Anyway many thanks for your inputs Cor Ligthert

Ganesh
 

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

Similar Threads

Sending mail via SMTP server 4
System.Net.Mail.SmtpClient is slower 1
SMTP Server 1
SMTP failure 1
Problems sending emails 1
SMTP Relay 1
Hwo to send SMTP mail??? 5
SMTP Sending Issue 6

Top