Exforsys

Free Training

Send email from asp.net application

This is a discussion on Send email from asp.net application within the ASP forums, part of the Programming Talk category; Hello, I am having a webpage on which I have a detailsView through which I insert a record in to ...

Go Back   Exforsys > Programming Talk > ASP

Exforsys.com

  #1 (permalink)  
Old 05-30-2006, 02:39 AM
Junior Member
 
Join Date: May 2006
Posts: 1
sreevani is on a distinguished road
Send email from asp.net application

Hello,
I am having a webpage on which I have a detailsView through which I insert a record in to the database.
I have a stored procedure called on InsertCommand which is used to insert a record in the database. Now my problem is how should I send an email on that insert.

I want to send an email when the insert to the database is done.

Can you please help me how send an email on insert into the database.

Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-12-2006, 10:53 PM
Junior Member
 
Join Date: Jul 2006
Posts: 20
chowsys is on a distinguished road
The first technique deals with requesting a confirmation read receipt. A confirmation read receipt is a special header tag that gets added to the email. When the email client (such as Outlook, Outlook Express, Eudora ) reads the read receipt header, an email is generated and sent back to the sender. If you are using aspNetEmail, a code example for doing something like this is:

[C#]

EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
msg.FromAddress = "me@MyCompany.com";
msg.To = "you@YourCompany.com";
msg.ConfirmRead = true;



[Visual Basic]


Dim msg As New EmailMessage("mail.MyCompany.com")
msg.FromAddress = "me@MyCompany.com"
msg.To = "you@YourCompany.com"
msg.ConfirmRead = True

Although this technique is easy to implement, there are a number of problems with it.

First: is that not all email clients support the confirmation read receipt header. Thus, a user may open a your email and read it, but you never get the read receipt email.

Second: of those email clients that do support it, most users have it turned off, because this is a technique used by spammers. Again, you will not get the confirmation emails.

Third: is that sometimes the user gets presented with a security dialog, stating the sender wants a read receipt. Some receivers view this as an invitation to their privacy, and will decline the dialog, and may unsubscribe from your newsletter.

Fourth: The Read Receipt would still need to be checked, and this would require an automated process scanning an inbox or a folder.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2007, 02:30 PM
Junior Member
 
Join Date: Apr 2007
Posts: 8
pegas is on a distinguished road
you did not mention which db server you are using. with ms sql server you can shoot the email right from the stored proc. (check with your dba, he might need to enable the feature). The advantage is that you can call stored proc asynchronously so your page does not have to wait for the insert and email generation and sending.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Creating an ASP.NET 2.0 Application rjames ASP 1 01-30-2007 07:35 PM
Hiring freshers hr_Joseph Freshers Jobs 0 05-26-2005 01:56 PM
how to integrate paypal into an asp.net application? shylesh Microsoft .NET Tutorials and Articles 1 03-23-2005 04:26 PM
Free VB .NET Std Ed. and ASP.NET Develop. Book sanereddy Microsoft .NET Tutorials and Articles 0 10-05-2004 01:59 PM
Send upto 1GB attachment to any mail sanereddy Chit-Chat 0 07-22-2004 10:17 PM


All times are GMT -4. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.