problem with SMTP mails.

  • Thread starter Thread starter Prashant Barnwal
  • Start date Start date
P

Prashant Barnwal

Hi,
This message i get whne i try to send mails theu my app server. any idea
where and what to look for? It works fine in Dev bed. Guide me to apprpriate
news group if its not the right place.

COM object with CLSID {CD000001-8B95-11D1-82DB-00C04FB1625D} is either not
valid or not registered. COM object with CLSID
{CD000001-8B95-11D1-82DB-00C04FB1625D} is either not valid or not
registered. at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic) at
System.Web.Mail.CdoSysHelper.Send(MailMessage message)

Thanks,
PB
 
What version of Windows is this on and are you using the .NET classes?

If possible, please provide some code.
 
This is put up on windows server 2003 and sample code is as below.
// Create a new mail message and set the values

MailMessage eMail = new MailMessage();

eMail.BodyFormat = mailBodyFormat;

eMail.From = FromAddress;

eMail.To = ToAddress;

eMail.Bcc = emailBCC;

eMail.Subject = MailSubject;

eMail.Body = MailBody;

string userName= emailUserName;

string password = emailPassword;

eMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1"); //basic authentication

eMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
userName); //setting username

eMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
password); //setting password

string smtpSERVER = smtpServer;

// Set the server address and send the mail

SmtpMail.SmtpServer = smtpSERVER;

SmtpMail.Send(eMail);


Let me know if you find anyhting wrong here.

Thanks,
PB
 
Do you have SMTP set up on your web server? What SMTP server are you
attempting to send this through? Do you have relaying rights set up on your
specified SMTP server?
 
Hi Reed,
thanks for your assistance.
I am using localhost as SMTP server, and I am able to relay mails, able to
send mails using the same piece of code.
But my problem is my queued component sends mail for me, at times it fails,
giving below mentioned error.
I have 3 app servers (clustered), one of the app server is failing
inconsistently.
I am not able to figure out why and how?

thanks,
PB
 
I'm guessing that part of the problem is that you have to authenicate. Are
you required to authenticate, or can you use anonymous access? Also, you
might want to make sure the user name and password are not null.
 
Back
Top