SendMail problem: Could not create 'CDONTS.NewMail'

  • Thread starter Thread starter Anthony Boudouvas
  • Start date Start date
A

Anthony Boudouvas

Hi to all,

i am just try to send emails in a timer-loop fashion, using the code below
and
i get the following error message:

Could not create 'CDONTS.NewMail'

The problem is not happening all the time and i do not understand
why is happening at all.
The machine i run my app is an NT4 Workstation SP6 with .net framework 1.1

Does anyone alse has encounetred this problem ??

Thanks a lot for any help

anthonyb

Code: ****************************************

while (reader.Read())
{
try
{
MailMessage EmailData = new MailMessage();
EmailData.Subject = reader["subject"].ToString();
EmailData.Body = reader["body"].ToString();
EmailData.From = reader["sender"].ToString();
EmailData.To = reader["receiver"].ToString();
AttachmentPath = reader["AttachmentPath"].ToString();
AttachmentDelete = Convert.ToInt32(reader["AttachmentDelete"]);
EmailID = Convert.ToInt32(reader["EmailID"]);
if (AttachmentPath != "")
{
files = AttachmentPath.Split(new Char[] {';'});
foreach (string file in files)
{
if (file.Trim() != "")
EmailData.Attachments.Add(new MailAttachment(file));
}
}
try
{
SmtpMail.SmtpServer = "192.168.132.250";
SmtpMail.Send(EmailData);
}
catch (System.Web.HttpException ehttp)
{
txtError.Text = ehttp.Message;
continue;
}
}
 
Hi Anthony,

CDONTS.NewMail is not guaranteed to be present on a machine. As far as I
know, it is installed with IIS and employs local SMTP server to send
e-mails. This scheme will obviously not work on a NT4 workstation. You will
most likely have to switch to CDO or even MAPI.
 
CDONTS.NewMail is not guaranteed to be present on a machine. As far as I
know, it is installed with IIS and employs local SMTP server to send
e-mails. This scheme will obviously not work on a NT4 workstation. You will
most likely have to switch to CDO or even MAPI.


Hi Dmitriy,

thanks a lot for your reply,

can you point me to a direction to use CDO or MAPI ?
(a help referencd or a code snippet)

thanks again!

anthonyb
 
Back
Top