.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Best Way to Send Multiple Emails

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
I'm building a website that allows users to post comments. When they do, they can check a box that indicates if they want an email notification when someone else posts a comment under the same topic. (Similar to this web site.)This means when a comment is posted, the code has to send an email to all the subscribed users.My concern is about what happens when many users are subscribed to a topic. There is a short delay when sending an email. Sending dozens or potentially even hundreds could really cause a delay.Right now, I just loop through each user and send the emails one by one. Does anyone know if that's the best way?Thanks!

View Complete Post

More Related Resource Links

how to send emails to multiple persons at the same time from sharepoint workflow using visual studio


Hi Every one !!

   I am trying to send copy of a document for multiple directors at my client for their approval.

   The director can approve the document at the same time.

   Hence, I would like to know how to create a task to send emails for multiple people at the same time from a sharepoint workflow using visual studio 2008.

   I see there is a parallel activity. But it gives me only 2 paths ( means would be able to send only for 2 users )

   If creating a separate task to send emails for each user is an inefficient way, please let me know if there is another good way of sending emails to multiple users.


Thank you

How to automatically run code and send emails?

Hi all- I would like to have users set some parameters, then have routines run in the middle of the night and if the user parameters are met, have an automated email sent to update the user at various time intervals as set by user , ie daily, weekly, monthly, etc.) Can someone please point me in the right direction on how I go about doing this?    

MOSS 2007 Alerts - Multiple Emails Issue

I've been experiencing a strange issue with SharePoint alerts that seem to happen randomly.  I've setup a daily alert on a custom list that sends a summary of all changes at 5pm, but on some days I'll receive more than 1 summary email (150+ this past Tuesday).  Each email contains different information and the total number of emails is random along with the number of records in each email.  Some days the summary comes in one email and others it comes in multiple.  This is happening on our production server and I haven't been able to recreate the issue in development.  Does anyone have any thoughts as to how a daily alert would get split up into several emails?We have 1 MOSS 2007 app server, 1 index server and 1 SQL 2005 database server.

Send multiple parameters SSIS execute process task



We are using Execute Process Task in SSIS package to execute a batch file to house keep the generated flat files which are older than a week from the archive folder.

The same batch file is used to delete the some temp files generated in the process.

As the Archive folder and temp folder paths are configurable, we are trying to pass the folder paths as parameters to batch file.

I used Expressions tab of Execute process Task Editor to map the variable to Arguments property. This is working fine. but I need to pass one more variable as an Argument.

Can some one help me how to achieve this. Thanks in advance.


Sreekanth ABS



Send 2 emails (different) on CreateUserWizard1_CreatedUser


I have a web application that allows a user to "join" our site.  When the CreateUserWizard completes, I just have the code below in the bottom of my wizard tags; and this works!

<MailDefinition BodyFileName="~/EmailTemplates/NewRegistrationUser.txt" Subject="Arts & Crafts Website - New Registration" >

I need to now add a second email that'll tell site admins that this particular user has requested access.  So the user gets an email saying "Thanks for registering... account is pending authorization"!  At the same time I need a second email to be sent to the site admins (just one email address) stating something like "A new user <%username%> has requested to join your site".  This is what I tried, but doesn't work:

<MailDefinition BodyFileName="~/EmailTemplates/NewRegistrationUser.txt" Subject="Arts & Crafts Website - New Registration" >
<MailDefinition BodyFileName="~/EmailTemplates/NewRegistrationSiteAdminAlert.txt" Subject="Arts & Crafts Website - New Registration" >

Of course this isn't working because the CreateUserWizard automatical

Sharepoint 2010, Not able to send emails?




I have installed Sharepoint 2010 on Windows server 2008 with SQL 2008. The installation was successful and I am able to access Sharepoint but when I add users and try sending invitation email I get error message. I have setup all the email configuration setting on Sharepoint, i.e. provided the SMTP server name and outgoing and incoming email address but still getting the same error message. I thought there might be some SMTP issue, so installed Outlook and configured it and I am able to receive emails on outlook using the same SMTP server. Could someone help me on this?

Can't send SMTP to all emails


Hi, I can send email with my asp.net 2.0 to gmail and other domains with my local SMTP server, but if I try and send it to a cellphone like 5551234567@tmomail.net, the mail just gets stuck in the SMTP queue.  I can send a text message via email to that same email address with normal email.  For example, I can send an email through gmail or my company's server to the tmomail.net email, but I can't from my local SMTP server.  I can send email with my local SMTP server to other Internet and Intranet emails, just not the phone.  My local SMTP is working, security is for localhost only, just can't send to this address.

 Thanks for any help.

Should Lotus Notes Client be running or Open in background to send emails programatically using .NET



Does Lotus notes client be running or opened in the background to send emails using Lotus Notes with .Net?

    I am working on a task where my app should send emails using Lotus Notes with .NET . I am able to send mails also. But the problem comes when i close my Lotus Notes mail and try to run my application which sends mails. But the mails are not being delivered. Reason, they were being stored in "Outgoing mail". Again when i open my Lotus Notes client by entering my username and password, then the mails that were in "Outgoing mail" were been delivered. Should lotus notes client run on the background for my application to send emails? Is there any way that my application sends emails even if lotus notes is not opened? I'm struck with this issue all day, did lot of research, but i could find anything.

i used this link  as a base ref to send emails using .net http://www.ibm.com/developerworks/lotus/library/domino-msnet/  

Any help regarding this is greatly appreciated.

Send Email to multiple users


Hi everyone

I have a problem with a workflow.

I use MOSS 2007 RTM
I have a custom sharepoint list with several columns where one (lets call it MailRecipients) are of the type 'Person or Group' with the property 'Allow multiple selections' set to 'yes' - this works fine, and I can create items, select multiple users from AD and so on.

Then i create a workflow using Sharepoint Designer 2007 and uses the action 'Send mail'.
I then want to send a mail to all the people selected in the column 'MailRecipients', but this column isn't present when I try to selected the column for the 'To' field in my workflow.
When I disable the proptery 'Allow multiple selections', there are no problem using the column in the To field in the Workflow

How will I be able to use the People or Group column (with 'Allow multiple selections' enabled) as a 'To' value in a workflow 'Send Email' action.?
I've tried making my own Custom Workflow action but have serious problems with this. Keep trying though!

Hope anyone have more experience with this part of MOSS 2007


Søren Bjerre, DK


Adding multiple attachment (files) to a dynamic variable so it can be send to a email. VB 2010


Hello !

I need some advice on what to use for adding multiple attachment to a email. I'm using VB 2010.

First, I have a Form in my company web site to fill a reclamation ..... when you fill and send it, it convert the form into a PDF, save it in the client side "TEMP" and finally get the PDF and send it to a email..... that's perfectly  fine. I add to the form the capability of attach multiple files with file upload to the same "TEMP" and displayed in a Grid View to remove or add files and send everything to a email, the attachment capability is working. Everything is working with the PDF not the files(attachments). 

There is a way to get the multiple files from the "TEMP" folder and add it to some dynamically variable (array list, attachment collection, list collection, etc.) so all can be send to the email. I already know the way to put it into the email with the PDF. The problem is to get the files and add it to the dynamic variable and that it work with the email.

If the code is need it, let me know.


SQL Server Job Generates Multiple Emails and Pages


In SQL Server 2005 I have set up a job with an email/pager alert via Database Mail.  It is working, but I am getting about 10 emails/pages every time the job runs.  Any ideas on why this is occurring?


Resolve AD names to Display names in SharepointDesigner Workflow emails for multiple user field



Is there a way I can resolve multiple users in a "People and Group" field to thier display name rather than Ad name in sharepoint when doing a designer workflow . The workflows job is send the mail to the business owners and request request that a certain permission be granted to User A, UserB, User C,...and so on.

SPD activities Linktitle action to my understanding only resolves a single user.





.Net 2.0 send email with multiple "To" recipients



I know how to send emails in .Net 2.0, but I can not send one with multiple email recipients in the "to" field.

If possible I would like to specify display names for all recipients in the "to" field but this is not required.

Event Handler (send mail task) firing multiple times for each dataflow error - How can I stop the da


I've set up an OnError event handler for my package which sends an email containing the name of the file that fails import through my dataflow task. The problem is the dataflow experiences three errors (one for each task it is attempting to complete) which in turn causes three duplicate emails to be sent.

I'd prefer to stop the dataflow task completely rather than allow it to try to complete the remaining tasks after the first error. Is this possible? Alternately, how can I set up my event handler to only send one email regardless of the number of dataflow errors that occur?

Thanks in advance!

Can't I send and receive emails without exchange server?


Hello Friends,

I know this question of mine sounds weird but here goes. I am installing SharePoint 2010 on a standalone machine which has its own AD, SMTP. Now I would like to enable email communications within the system and almost all the forums I come across say that exchange server is needed for email communication. My question is can't this be done without exchange server???

If the exchange server is not needed please do provide me with instructions on how to go ahead with my installation.

Thanks & Regards, Chandra Shekhar Rameneni

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend