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

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

Send an Email with User fields data entered in the form

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint

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.


View Complete Post

More Related Resource Links

Linq - add data to database then email user the details


Hi all

I'm not sure how to structure the code for this but what I want to do is be able to add data to a database, and once this has completed successfully, then email the user to say the details have been added successfully to the database.

I need to:

1. Check that the relevant data has been added into the database then

2. Email the details of the relevant data when completed. 


Thanks in advance for your help,




Create ID (uniqueid?) from two fields when data is entered


I need to create an ID from two fields when they are entered into the db for the first time.  I thought Uniqueidentifer would do this, but it looks like uniqueidentifier is random and i have no control of the process. 

My user will enter 4 letters into a column called INIT and 4 numbers into a column called NUMB.  What I would like to do is create an id by combining those fields.

How can I do this?



Need Form Application to allow user to review spreadsheets and email

I need an application to allow a user to see a list of documents/spreadsheets in a directory, click a link to the file, have it open, then review it, close it, then from the form choose to accept or deny it, then have it emailed to a recipient contained in a db or list any good ideas how to accomplish this?  maybe a windows form?    

putting data in a format send by email

Gooday If i want to send my data to someone by email so as they can update the data into their database , how can i do this . The database is too big to send by email? thanks Robrh

how to duplicate fields on form data source?

I have many fields with similar names and same type. Is there any easy to copy and paste and then change field names? thanks,

Need help on Select button column in Data Grid to populate fields in Form View


 When I have a select a row in a Data Grid that when I click on it I want it to show the info for the person I selected in a form view on the same page as the Data Grid. Here are the columns for the Data Grid that I have set up, the column is highlighted:

<asp:DataGrid ID="MHGrid" AutoGenerateColumns="False"  
        DataSourceID="MHFoundation" DataKeyField="POPULATION_LIST_ID" 
        AllowPaging="True" AllowSorting="True" BorderStyle="Solid" 
        BorderColor="#999999" BorderWidth="3px" CellPadding="4" PageSize="4" 
        CellSpacing="2" runat="server" BackColor="Gray" Font-Bold="False" 
        Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
        <SelectedItemStyle BackColor="#FF9900" Font-Bold="False" Font-Italic="False" 
            Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
            <asp:ButtonColumn CommandName="Select"  Text="Select"></asp:ButtonColumn>
            <asp:BoundColumn D

xml secondary data source used for drop down selection how do I return additional fields to form bas


I received some much needed assistance from this forum in the past. My current situation is that I have a xml data connection to a sharepoint list over an employee database that works fine. It allow me to connect to a view on the sharepoint list correctly and display the info which is a drop down on a last name field. I now need to be able to select a last name such as Doe and have other fields such as job code be populated on the form from the same sharepoing list I have already connected to. Any direction is greatly appreciated.



How to get Email of Current User Data View Web Part Sharepoint 2010 and pass to WebService data sour

I have to pass in the email address of the current user to a web service data source (run time) of a Data View Web Part.

My Question is:

a) How can I get Email address of current user based  in DVWP.
I know we can get the CurrentUser using the CurrentUserName but how do we get the Email for the Current User.

b) After getting the Email how do we pass to the Web Service.

Need code for send email from enquiry form


Dear All

I need code in C# and ASP.Net for send Email from enquiry form



SPD workflow doesn't send email to user in list when automatically started

Hi all,

My first post here and I hope someone out there could kindly help. I recently found out a strange issue with my SPD workflow. Basically, it couldn't send out email if (1) the recipient resides in the list and (2) the workflow is automatically started.

For example, I have a list with a "user" field. A workflow first "Send an email" to this user, and then "Collect data from a user" from this user. If the workflow is set to start automatically, then this user gets no email. Tasks list does contain a task, but the "Assigned To" field of the task is empty. This is the case no matter if the user field is of type "Single line of text" or "Person or Group".

Everything's fine if I manually start the workflow. And everything's fine if the user is directly spelled out (jay@company.com) in the "Send an email" and "Collect data from a user" actions instead of retrieved from the list. Either case the user would get two emails as expected, and the "Assigned To" field would display the user name properly.

I looked into the log but didn't find anything special. As you can imagine, this is breaking a lot of our workflows and making SPD workflow look very bad. It's just not

How to Create Web Form Using ASP.NET and Send Email


Hello All,

I've been in IT for a number of years on the Infrastructure side but I'm a complete newbie when it comes to ASP.NET programming (I literally started today).  I'm using Microsoft Web Expressions 2 to create a website and am used to using the regular HTML based forms to have the forms capture and email me the form data.  However, from a need to have more advanced Form Validation I've embarked on changing my forms over to ASP.NET.  All was going well when I seem to have hit a bit of a road block here.

I've managed to figure out the RegularExpressionValidator and RequiredFieldValidator Validation controls however I've now added an ImageButton that I want to be the form Submit button and to email me the form results once the user hits Send.  But from the examples I've found online I'm still stumped on how to implement this.

Below is the form code from the page.  My site is hosted with 1&1.com and I just want the form info to come to me at my email address, preferably in HTML format.

Can someone assist with this?  Thanks in advance.


<form id="ContactUs" runat="server">
     <table style="width: 100%">

Infopath send form as email

I have created a infopath form and it is published to a sharepoint 2007 with form services.
We use a support system, that only support plain/text, how can I convert the output to plain/text ?
When infopath automatically converts the form to plain/text, i does not look good.
I would like a format like:

Field1: Value1
Field2: Value2

And another thing, is it possible to use the users email as sender, and not the email setup in our sharepoint environment ?
Every email sent from sharepoint / infopath, is sent from: noreply@domain.tld
I would like: user@domain.tld (user = the user who is logged in)

Jakob Olsen

Automatically send custom email to upon InfoPath form submission


I would like to have an InfoPath form automatically send out and email upon submission.

I would like the email to be comprised of content from the fields of the form. For example:


To: <data from the "Manager" field>

From: <data from the "Requester" field>

Subject: You have a request for <data from the "Project Name" Field>.

Body: Hi <Manager>,

I would like more information on <Project>

-< Requester >


Is this possible? It doesn't need to be part of a workflow, we just want the relevant manager aware of the request.

How to set or assign a Workflow Variable from data entered in a Form Web Part


Greetings -

I have a Form Web Part wherby the user enters a number

That number is sent to a subsequent Data View WebPart that uses the number to pull data from another source via a Web Service.

This all works fine. BUT

I'd also like for that number entered into the Form Web Part to be set as a Variable to be used until a new number is entered into the Form Web Part when the variable will be changed accordingly.

I need the newly set variable to be later used for filtering out data in other lists and views.

I also need the variable to automatically set a field in any newly created list item.

Gurus, please help.

Send Attachments from a form to email


Have a transport form (infopath 2007) that give users an easy web based ability to upload document for compensation. So I created the InfoPath form and added a repeating "File-Attachment" control to the form and the form just sends a email to a specific recipient  

The form are showed in a xmlformview webpart on a transport.aspx page 

It sends out a email to the recipient - but the attachments aren't delivered with the email.

How can I accomplish that?

How can I show data from a Workflow variable in a Collect Data from User form?



I have collected some data from a user in a SharePoint Designer workflow step and I now want to display that data in a second "Collect Data from User" form at a subsequent step in my workflow.  How can I add the content of my Workflow data variable in the Collect Data from user form?

This guy says he has done something similar but does not explain the detail: http://www.mstechblogs.com/paul/spd-workflow-collect-data-from-a-user-modify-the-generated-task-form

I'm keen to hack at the aspx form in SPD but I really need the particular line of code that will do it as I'm not a developer.

Your help is greatly appreciated!

How can I show data from a Workflow variable in a SharePoint Designer Collect Data from User form?



I have collected some data (a comment) from a user in a SharePoint Designer (SPD) workflow step and I now want to display that comment in a second "Collect Data from User" form at a subsequent step in my workflow.  How can I add the content of my Workflow data variable, or even data from my original item, in the Collect Data from user form?

The Collect Data from user form is generated out of the Workflow Tasks list and only contains the url of the item where I could store the comment and which has the workflow attached to it.

This guy says he has done something similar but he appears to only use the URL and static info and does not explain the detail in any case: http://www.mstechblogs.com/paul/spd-workflow-collect-data-from-a-user-modify-the-generated-task-form

I'm keen to hack at the aspx form in SPD but I really need the particular line of code that will do it as I'm not a developer.

Your help is greatly appreciated!

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