.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

Send Email to multiple users

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :SharePoint

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


View Complete Post

More Related Resource Links

send email to all users with certain rights

Hello,  I'm using Sharepoint Designer and Foundation 2010. I am a new admin and appreciate all the help I can get.  Here's what I'm trying to do.   I have several business workflows that call for notifying the users of a particular site. Rather than set the workflow to email specific users or even a group of users, I'd like to set the workflow to email anyone within a certain rights level. For example, I want to notify all users with Contribute level rights whenever a new document is loaded or modified.    Is there a quick way to do this?Beth Singley PBM Graphics

Cannot create email alerts for multiple users

Hello, I created an email alert for a document in a library. In the "Send Alerts To" box, I added multiple user names separated by semicolons and saved the alert. However, when I open the alert again, only my user name appears and the additional user names are gone. Why is this happening and how do I fix this problem?  Thank you in advance.

SPD Email only works when I type actual e-mail, but does not send to users or groups


I've viewed other e-mail related posts on this forum and have not seen this specific question, so I'll ask.

I've got an approval workflow that I created in SPD.  It works, but when I try to attach e-mail to it, the e-mails do not send to the e-mails associated with the user or groups profiles in SSP (User profile properties). 

For testing purposes, I tried creating a simple workflow that only sends one email to one person.  This doesn't work.  I try sending it to 2 different specific e-mail addresses instead of trying to do a "This specific user" or "Current item:Created by" or something else chosen by SPD: 1 of which is a personal e-mail, another is an e-mail that is assigned to a user's profile in SSP.  Both were received.

So basically the situation is what title says: SharePoint Designer workflow sends an e-mail when the e-mail targets specific e-mail addresses, but not SharePoint users or groups.  So basically DOMAIN\username does not work, but user@domain.com does work.  Any suggestions would be appreciated.

I'm using Moss 2007, SP1.

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.


.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.

Send Email from SQL Server Express Using a CLR Stored Procedure

One of the nice things about SQL Server is the ability to send email using T-SQL. The downside is that this functionality does not exist in SQL Server Express. In this tip I will show you how to build a basic CLR stored procedure to send email messages from SQL Server Express, although this same technique could be used for any version of SQL Server.

If you have not yet built a CLR stored procedure, please refer to this tip for what needs to be done for the initial setup.

How to send an email with information in query string


First I will say I googled (Binged to make Bill happy) for this but could not find anything, perhaps I am not stating what I need correctly;

I have a website that a customer creates orders (for a printing company) and after the order, I would like to email the customer a link to view the status of their order;

I need to send the CustomerID in the link so on the returning page if a CustomerID is detected in the querystring, I "auto login" the client and open the "Dashboard" for the order page for that customer.

Can anyone point me in the right direction as to how to send the link and how to parse the querystring to get the values from the link;

Thank you if you can point me in the right direction.

Send email throught proxy



i want to send a mail via my mvc application hosted by cassini ,but  i access to the internet connexion throught proxy

i add this lines on my web config :

    <defaultProxy  enabled="true" >
      <proxy proxyaddress=""/>
        <network />
and in my code i have :
 MailMessage mail = new MailMessage();
             mail.From = new MailAddress("yyy@xxx.fr");
                    mail.Subject = "Test";

                    string Body = "Hi, this mail is to test sending mail" 
                    mail.Body = Body;
                    mail.IsBodyHtml = true;
                    SmtpClient smtp = new SmtpClient("");
                    smtp.Port = 25;

                catch (Exception ex)
                    string exep = "Send Email Failed." + ex.Message;

 i have un exception :"Unable to connect to the remote server"

How to send mail to individual users.



  I need to send the same mail to multiple users separately. I dont want to use comma delimeted "To Address" . Because other users can able to see the recipients.

   Each recipient should not know about the other recipients. 

   How will I achieve this one without for loop ?


how to write a stored proc to prevent multiple users in uploading the reports at a time? plsss help



I wanted to know how to prevent more than one user from uploading the report at a time .I am new to .net ,plss help with the code that would be great.Details are below:

This is a Windos based app written in c# . When User A  clicks Upload option on  one server  from the menu  to upload the files  and at the same time when User B clicks Upload option on different server , User B should be alerted a message saying "User A's uploading is in progress,pls wait" . How to achieve this, plsss help with the code.. I am thinking this logic should be kept in a stored proc, How do I write that proc? plss help


Thanks in advance!

Send an Email with User fields data entered in the form


Hi All,

          I have a form which have some user input fields(like textboxes,dropdownlists,textarea etc) fields and a submit button.

on click i need to send email with body contents as all the details entered by user in the form

Can anyone suggest how i should approach to this in sharepoint..

any code examples would be appreciated.


Trying to send email using Sharepoint Designer 2007 workflow and email enabled list


I have a a list that recieves email. I have few fields that shows me the originator: "E-Mail From" and "E-Mail Sender".

I am trying to create a workflow that will generate an auto reply to the originator but the SPD fails to recognize the email address in these two fields. It's either truncating part of it or uses the html ( href=mailto:Demo@DemoSomething.com) in the To field.

Thank you,


I can't send email from workflow.


I’ve got strange problem. I’ve created workflow with Visual studio 2008 which works fine. If workflow create task user gets email with alert and it works  - user gets email.   The problem is that I would like to use Workflow component: “SendEmail” for some cases. And if I enter directly into component email address for field: “TO” the message will be delivered. But if I use simple code with the same email address for field ”TO” it doesn’t work (field TO is empty now).

private void sendEmail_ExecuteCode(object sender, EventArgs e)



send email using Godaddy server by gmail


 Hello ,


My site is hosted  in Godaddy server. And i am using google apps for emailing a/c for that i have changed the  MX-records and then it is working fine.

Then i finished my web site


it is working fine there .

in the site there is a  contactus link which opens


this page basically should send a mail to a particular email id .

for sending mail I am using gmail a/c . (Here is the full code)


public void SendEmail(string From,string GmailEmail, string GmailPassword, string To, string Subject, string Body,      
        FileUpload fileupload)

        System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
        mail.From = new MailAddress(From, "One Ghost", System.Text.Encoding.UTF8);
        mail.Subject = Subject;
        mail.SubjectEncoding = System.Text.Encoding.UTF8;

Send HTML email with banner inside


Hi all,

I want to send html emails with one promo-banner inside. Have a look at my code... I try but with no success.


            Dim strFrom, strTo, strSubject, strBody As String
            Dim myMessage As MailMessage
            Dim mySmtpClient As SmtpClient
            strFrom = "SENDER<test@example.com>"
            strTo = Session("eemaill")
            strSubject = "HELLO THERE!"
            strBody = "HELLO THIS IS MY MSG<br />" + _
            " <script type='text/javascript'> var ai = 899; var rc = 40; var rt= 2; var rc_width = 724; var rc_height = 90; </script>" + _
            " <script type='text/javascript' src='http://assets.example.com/s/ads.js'></script><br /><br />" + _
            "<b>THANK YOU</b>"
            myMessage = New MailMessage(strFrom, strTo, strSubject, strBody)
            myMessage.IsBodyHtml = True
            mySmtpClient = New SmtpClient("mail.example.com")




Thank you

send an email use asp.net



am writing the bellow code to send email from a web page and recieve it via my hotmail email

MailMessage mailMessage = new MailMessage();
        mailMessage.From = TextBox1.Text;
        mailMessage.To = "XXXXX@hotmail.com";
        mailMessage.Subject = TextBox2.Text;
        mailMessage.BodyFormat = MailFormat.Text;
        mailMessage.Body = TextBox3.Text;
        mailMessage.Priority = MailPriority.Normal;
       SmtpMail.SmtpServer = "smtp.live.com";

but I recieve the bellow error

The server rejected the sender address. The server response was: 530 5.7.0 Must issue a STARTTLS command first

How to send Viewers email alerts on approved items



I use the OOB Workflow approval to approve items in a document library. Once the items are approved I want to send out an email alert to a group of people with "read" access. The problem is that the email alerts don't fire. I even changed the alerts to fire on "All Changes", but still nothing coming through. I assume this is because of the workflow approval and perhaps that the event doesn't fire when an item gets published after approval?

But how can I get my readers to be notified of newly published (and approved) items? There must be a way of doing it?

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