473,386 Members | 1,702 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,386 software developers and data experts.

Help! Sending Emails From asp.net Application

I am currently developing a C# asp.net application where users are
required to register. The application then generates a simple, plain
text email and sends it to the new user.

I have been trying to use the MailMessage and SmtpMail classes from the
System.Web.Mail namespace (built in to .net) to do this. It is my
understanding that these classes use CDONTS (cdosys.dll) and the SMTP
mail service on the server to send the messages. Messages are generated
and then placed in the "Queued" folder under the SMTPRoot folder in
IIS. The SMTP server service does the rest...

The problem I am having is that this method appears to be extremely
unreliable, at best. Sometimes the message will send, and sometimes I
get a "could not access CDO.Message" exception/error. After searching
for this on usenet, I have also discovered that this problem appears to
be very common. The only solution I can find is to reboot the
service/server (and that doesn't always work!)

Anyways, this is clearly not going to work in a production environment,
so I need to do something about it.

I would like to know if anyone has any suggestions on what I might do
to improve performance and reliability when trying to send emails from
my asp.net application. Are there better options to use for this (i.e.
3rd party components or tools?) If so, what would you recommend, and
why?

Thanks in advance for your help!

Nov 19 '05 #1
2 1420
Joey wrote:
The problem I am having is that this method appears to be extremely
unreliable, at best. Sometimes the message will send, and sometimes I
get a "could not access CDO.Message" exception/error. After searching
for this on usenet, I have also discovered that this problem appears to
be very common. The only solution I can find is to reboot the
service/server (and that doesn't always work!)

Anyways, this is clearly not going to work in a production environment,
so I need to do something about it.

I would like to know if anyone has any suggestions on what I might do
to improve performance and reliability when trying to send emails from
my asp.net application. Are there better options to use for this (i.e.
3rd party components or tools?) If so, what would you recommend, and
why?

Thanks in advance for your help!


I've heard good things about aspNetEmail (haven't tried it myself though):

http://www.aspnetemail.com/

Good luck,
Ben
Nov 19 '05 #2
Hi, Joey.

The biggest problem I've seen when using an smtp server to send emails
is that the connection limit is easily surpassed because the system can
create emails faster than they can be sent out.

That causes a bit of unreliability and choking.

I've seen good results, and almost perfect reliability, when a little
delay is introduced to allow the number of connections to be lowered.

This little piece of code might be of help ::

if( connectionLimit != -1
&& ++sentCount >= connectionLimit ) {

System.Threading.Thread.Sleep( new TimeSpan( 0, 0, 0, 15, 0 ) );

sentCount = 0;
}

re:
It is my understanding that these classes use CDONTS (cdosys.dll)
and the SMTP mail service on the server to send the messages.
Windows Server 2003 does not install Collaboration Data Objects (CDO)
for NTS (CDONTS). Therefore, applications that use CDONTS do not
function on a Windows Server 2003-based computer.

Actually, the System.Web.Mail namespace provides a managed wrapper
for CDOSYS. The System.Web.Mail namespace is only available in
..NET Framework applications.

re:
"could not access CDO.Message"

What is your OS ?


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Joey" <jo*********@topscene.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...I am currently developing a C# asp.net application where users are
required to register. The application then generates a simple, plain
text email and sends it to the new user.

I have been trying to use the MailMessage and SmtpMail classes from the
System.Web.Mail namespace (built in to .net) to do this. It is my
understanding that these classes use CDONTS (cdosys.dll) and the SMTP
mail service on the server to send the messages. Messages are generated
and then placed in the "Queued" folder under the SMTPRoot folder in
IIS. The SMTP server service does the rest...

The problem I am having is that this method appears to be extremely
unreliable, at best. Sometimes the message will send, and sometimes I
get a "could not access CDO.Message" exception/error. After searching
for this on usenet, I have also discovered that this problem appears to
be very common. The only solution I can find is to reboot the
service/server (and that doesn't always work!)

Anyways, this is clearly not going to work in a production environment,
so I need to do something about it.

I would like to know if anyone has any suggestions on what I might do
to improve performance and reliability when trying to send emails from
my asp.net application. Are there better options to use for this (i.e.
3rd party components or tools?) If so, what would you recommend, and
why?

Thanks in advance for your help!

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
4
by: Sarir Khamsi | last post by:
Is there a way to get help the way you get it from the Python interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the module cmd.Cmd? I know how to add commands and help text to...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
6
by: d.warnermurray | last post by:
I am doing a project for school that involves creating help files for a html authoring tool. If you could help me with answers to some questions it would really help. 1. What tasks do you expect...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
2
by: BT Openworld | last post by:
I have just had to upgrade to Access 2003 as Access 97 EMail (SendObject) doesn't work when loaded on Windows XP. I'm finding my way around Access 2003 but my biggest problem is getting...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
10
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
1
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.