473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 3294
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Guillaume Hanique | last post by:
Hello! Could anybody help me. I wrote a program that interprets information in a database, and can send information via email. The program works fine on my developer machine, but when I run...
1
by: | last post by:
Hi Guys CDONTS works with all sites hosted on my test server bar one (which surely rules out a miscomputation of the Default SMTP server in IIS). I have tried uploading the file with make up...
2
by: Tom Petersen | last post by:
Is there anyway to display the comma using CDONTS.NewMail on the from 'object' For example, when I send the email, I want it to say from: Petersen, Tom, but when I rec. it only shows Petersen. ...
6
by: vasanth kumar | last post by:
I am running the following script for sending e-mail thro web Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = "vkumar@ugs.com" objCDOMail.To = "vkumar@ugs.com"...
9
by: Jason | last post by:
it works from my logon (domain admin account), but everyone else gets Microsoft VBSCript runtime error '800a0046' Permission denied path/patj/script.asp line 16 I looked at a lot of articles...
5
by: MichaelK | last post by:
What do I need to do to enable CDONTS om my macine to make it working I'm testing the code: Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") objCDO.To = "xyz@xxxxx.com"...
0
by: Shailja | last post by:
Hi, I have added reference Microsoft CDO for NTS 1.2 Library to my project. I am trying to send an Email from my system but I get the error "RUN TIME ERROR 429 - ACTIVEX COMPONENT CAN'T...
1
by: SSG | last post by:
Dear All, I am new to ASP , I am using Win XP pro .. I am trying to send mail thru ASP pgm... BW is the coding....... <% Sub send_email(email_from, email_to, email_subject, email_body)
4
by: bgs | last post by:
i'm trying to send mail from asp server in two ways, the first uses CDONTS.Newmail: <% Dim objCDOMail Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.BodyFormat = 1 ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.