473,587 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Subje ct = reader["subject"].ToString();
EmailData.Body = reader["body"].ToString();
EmailData.From = reader["sender"].ToString();
EmailData.To = reader["receiver"].ToString();
AttachmentPath = reader["AttachmentPath "].ToString();
AttachmentDelet e = Convert.ToInt32 (reader["AttachmentDele te"]);
EmailID = Convert.ToInt32 (reader["EmailID"]);
if (AttachmentPath != "")
{
files = AttachmentPath. Split(new Char[] {';'});
foreach (string file in files)
{
if (file.Trim() != "")
EmailData.Attac hments.Add(new MailAttachment( file));
}
}
try
{
SmtpMail.SmtpSe rver = "192.168.132.25 0";
SmtpMail.Send(E mailData);
}
catch (System.Web.Htt pException ehttp)
{
txtError.Text = ehttp.Message;
continue;
}
}
Nov 15 '05 #1
2 3304
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******@media tel.gr> wrote in message
news:eH******** ******@TK2MSFTN GP10.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.Subje ct = reader["subject"].ToString();
EmailData.Body = reader["body"].ToString();
EmailData.From = reader["sender"].ToString();
EmailData.To = reader["receiver"].ToString();
AttachmentPath = reader["AttachmentPath "].ToString();
AttachmentDelet e = Convert.ToInt32 (reader["AttachmentDele te"]);
EmailID = Convert.ToInt32 (reader["EmailID"]);
if (AttachmentPath != "")
{
files = AttachmentPath. Split(new Char[] {';'});
foreach (string file in files)
{
if (file.Trim() != "")
EmailData.Attac hments.Add(new MailAttachment( file));
}
}
try
{
SmtpMail.SmtpSe rver = "192.168.132.25 0";
SmtpMail.Send(E mailData);
}
catch (System.Web.Htt pException 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
4084
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 it on an other computer, I get the error "Could not create 'CDONTS.NewMail' object..." a lot of times and then an error: "Failed to load resources...
1
4699
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 the site in which CDONTS to one of the IIS "sites" which is known to work with CDONTS, and still, no email received. The bad mail dir gets three...
2
2048
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. Set Mail=Server.CreateObject("CDONTS.NewMail") Mail.From="Petersen, Tom" < doesn't work Mail.From=Request.Form("requestor") < doesn't work, but...
6
8148
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" objCDOMail.Subject = "Library books" objCDOMail.BodyFormat = 0 objCDOMail.MailFormat = 0 objCDOMail.Body = "hi" objCDOMail.Send
9
19001
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 and gave the IIS accounts full access to the mailroot folder, along with the 'regular' domain user account I am using to test... still no good. also...
5
27689
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" objCDO.From = "zyx@zzzzz.com" objCDO.Subject = "TESST CDONTS MAIL" objCDO.Body = "SOME TEXT TO SEND OVER"
0
874
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 CREATE OBJECT". . The code is as follows; Private Sub cmdSend_Click() Dim myMail As CDONTS.NewMail
1
3738
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
2965
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 objCDOMail.Subject="test"
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8205
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.