472,354 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 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 1344
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: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

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.