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;
}
}
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;
}
}