Sending E-Mail from custom assembly
Hi all
I hav tired sending a mail from my custom assembly using following piece of code
SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
MailMessage objmail=new MailMessage();
objmail.To="user@hotmail.com";
objmail.Cc="user1@yahoo.co.in";
objmail.Subject="From WebPart Page";
objmail.Body="This is Test";
objmail.From="test@yahoo.co.in";
SmtpMail.Send(objmail);
when i tried sending mail i get "Could not access 'CDO.Message' object" error message
Actaully the same piece of code is working fine for Asp.Net WebApplication that has been deployed in my local system
Are there any changes that has to be done while using a custom assembly ?
Thanks
Srujan.N
|