.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

Cannot send custom form email

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF


I have an issue sending emails with custom message class. I am using WebDav and I don't think it is a problem with the code. My code puts an email into the drafts folder, changes the message class to a custom class and moves it to DAVSubmissionURI (which sends the email). Why I am so sure that it is not an issue with the code is if I remove the piece of code which changes the message class it sends the email but if I put it back I can see it in the sent items but the email is not received by the recipient.

Many Thanks,


View Complete Post

More Related Resource Links

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.

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.


Need code for send email from enquiry form


Dear All

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



Custom workflow action - send an email with blind carbon copy

Question: Is there any way that we can send an email with blind carbon copy (BCC) option? I know this feature is unavailable in the custom workflow action (in SPD-2007) but there is a requirement where I need to send an email without revealing other ids of other recipients. 

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

System does not send an email to an approver when a custom workflow is cancelled


We have a custom workflow created using SharePoint Designer (SPD). The workflow starts when user submits a (InfoPath) form. The workflow sends an email to an approver. On one occasion, user submitted the form, workflow started, user (submitter) realized he had made a mistake and decided to cancel the workflow (using the procedure: Cancel a workflow in progress). In the meantime, the approver had already received an email and when the approver clicked on the link "Edit This Task" in his email, he got the following error message. We were hoping that SharePoint would have sent the approver a notification for the cancellation of the workflow. OOTB (Out-of-the-Box) workflow probably sends a cancellation notice to the approver. How can we achieve the same functionality in custom workflow?:

//////Error message when approver clicks on "Edit this Task" link in his email:

No item exists at http://ServerName/SiteAddress/Lists/My Workflow Tasks/DispForm.aspx?ID=2.  It may have been deleted or renamed by another user.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily clo

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 to send an email to Supervisor (field in the form) after New Item in a list is created?


I have user who creates a record and User's Supervisor, who need to get notification about new record (different Users have different Supervisors and they input them manually into field when create a new record).

(Users I've mentioned are domain users with emails assigned to them and we use Outlook that is integrated with our sharepoint)


1) I've tried to create a workflow in Sharepoint Designed (as described here: http://social.msdn.microsoft.com/forums/en-us/sharepointdevelopment/thread/2A525E2F-2407-42C9-AB9D-B5FB609B34B5) , but there I can choose only concrete email address (I need it to be populated from the field on the form).

I think the workflow can be configured somehow to send an email to user from a field, but I don't know how. 


2) I've created a new view with filters by Supervisor and configured Alerts for the view, but it is too complicated for all Supervisors to do that. (just not the best solution)


any ideas? 

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"

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,


spd2007 - basic form and email


I'm using spd2007 and have created a very basic form to collect data. I've also set it up to send off an email. When I go to the moss2007 site and use the form it appears to be working fine. However, I never receive an email from the workflow. I checked my logs and don't see anything logged about the email not working.

Any suggestions?

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

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