469,628 Members | 1,119 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,628 developers. It's quick & easy.

SendMail problem: Could not create 'CDONTS.NewMail'

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;
}
}
Nov 15 '05 #1
2 3216
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.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Anthony Boudouvas" <an******@mediatel.gr> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
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;
}
}


Nov 15 '05 #2
> 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
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Guillaume Hanique | last post: by
6 posts views Thread by vasanth kumar | last post: by
1 post views Thread by SSG | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.