.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

SQL mail

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :Sql Server

How to send a mail from SQL server with the attachment. the attached filename is created dynamically with today date.?

Can anyone please help.?

View Complete Post

More Related Resource Links

Mail Merge




I am after creating a mail merge documents from datasource and .dot template file on server side. Can you give me an idea how i will achive this?


Thanks in advance.



Syed Hussain



Email Help (System.Net.Mail)


Hi I have a annoying problem. 
I have created a page which takes users details for a quote.

I have then created the form to be emailed to both the user and myself. (Which works fine ATM)

However I would also like to be able to attach a file containing terms and conditions to the email.

I have tried doing this using 

EmailMsg.Attachments.Add(new Attachment("C:\\attachme.txt"));

But everytime that line of code is hit it fails and is caught by my try catch.

Take that line out and the email sends fine, put it in and it breaks the whole page.

Am I missing something really obvious?

Toolbox: Create Graphs, Send E-Mail, Spell-Check, and More


Turn boring data into stunning graphs, create, parse, send, and receive mail messages from code, and more.

Scott Mitchell

MSDN Magazine August 2007

BizTalk Adapters: Integrate E-Mail Processing Into Your Business Solutions


Use BizTalk Server to monitor e-mail for new messages, trigger confirmations, and persist e-mail and attachments to a custom database.

Alex Starykh

MSDN Magazine December 2006

Toolbox: Automated Build Process, Real-World E-Mail Tasks, and More


While the Visual Studio® Build menu's Build Solution option is the usual way developers compile their current work on a project, the process of building the complete solution for testing, deployment, or production often requires many more steps.

Scott Mitchell

MSDN Magazine March 2006

Editor's Note: Reader E-mail


Here at MSDN Magazine, we get a lot of mail from readers. As you can imagine, much of it involves fulsome praise for our content, our eye-catching covers, or the handsome photo that now graces this page.

Joshua Trupin

MSDN Magazine June 2005

SQL and Outlook: Enable Database Access and Updates Through Exchange and Any E-mail Client


Using Microsoft technologies, you can insert, edit, query, and delete database entries using any e-mail client such as Hotmail, Outlook, Yahoo, or even WAP phone. While e-mail is certainly a powerful and widely used tool, it is usually not integrated with an application for performing any tasks other than sending reminders. The application scenario described here, an e-mail-based SQL update program, uses a simple data model; however, this solution will apply to any data model that you are working with. It will also eliminate the need for complex n-tier Internet applications and serves as a low maintenance solution for providing data access.

Alok Mehta and Daniel Williams

MSDN Magazine January 2002

I cannot send mail using gmail smtp server


 Here is my code

Dim message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
        message.To.Add("from textbox field")
        message.Subject = "Testing"
        message.From = New System.Net.Mail.MailAddress("sender email ")
        message.Body = "Just Testing"

        Dim smtp As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()

        Dim client As SmtpClient = New SmtpClient()
        smtp.Credentials = New System.Net.NetworkCredential("username", "password")
        smtp.Port = 25
        smtp.Host = "smtp.gmail.com"
        smtp.EnableSsl = True
        smtp.DeliveryMethod = SmtpDeliveryMethod.Network
        lblmsg.Text = "Your Email has send"


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 ?


Can we edit default mail format?



I have created a Sharepoint Designerworkflow, which gets initiated when a document is uploaded in document library.

I want to know that can we change the content of default mail.




SharePoint Workflow E-mail Hyperlink has the Spaces Between Two Words Are Removed

I have a very simple Workflow, that includes href link to Infopath form.
If the form name includes spaces, the URL redirects to a The Form has been Closed message, indicating that it cant find that form.
In our scenario, the file name of the document/form in SharePoint when saved is called "Travel Request - <submit date>"  as noted with spaces.
The Hyperlink URL in the email generated by the workflow appears to encode all values in the name after the first two words (after Request).  See below.  after the word Request the spaces are encoded properly.     its replacing the first space with it appears %0d%0a (CR LF)
The URL below is what is displayed when right clicking, and selecting Edit Hyperlink in the email

I can reproduce this in development and production.  Any ideas on how this can be resolved?

SP Outgoing E-Mail Error


Hello Community,

I have a MOSS Server running on Virtual PC.  I have installed and configured MOSS to include incoming and outgoing e-mail.  Incoming e-mail works fine and my lists are receiving e-mail.  My problem is outgoing e-mail.  Right now, any outgoing e-mail produces an error message that is caught by the System Event Viewer, here is the error message:

Event ID: 6857

Description: Cannot connect to SMTP Host

I have checked and rechecked my outgoing e-mail settings and I'm convinced they are correct.  I don't have any firewalls on (it's a virtual development server on a platform that has ant-virus, firewall, etc.).  I have enabled verbose logging for SharePoint Workflow Infrastructure events but the SP Logs only have the same exact message as System Event Viewer.

I've checked out the other posts here and searched the internet as well but no luck.

Any ideas?

Tom Molskow SharePoint Architect - If I solved the issue please propose my reply as the answer - Thanks!

system.net.mail cc issue


I have an array of addresses.....

	Protected Function GetData() As String()
Dim stringArr(3) As String

stringArr(0) = "youremail1@fakeaddress.com"
stringArr(1) = "youremail2@fakeaddress.com"
stringArr(2) = "youremail3@fakeaddress.com"

Return stringArr

End Function

I am getting an error when i run the code in the CC part....please put this in the right syntax..

MassMail.CC.Add() .......getdata???

how to embed image in mail body while sending mail in c#.net uisng Exchange2007_SP1.



I am uisng ExchangeVersion.Exchange2007_SP1 EWS to send mail through my c#.net application. I want to embed image in mail body so tht user can see body message along with image in its inbox mail .currently I am uisng image tag to show image but in the email body its just showing image url instead of image.

E-Mail Alerts for users on Task List


Is there any way to send e-mail alerts to a specific user wihtout assigning them the task or having them subscribe to the list.

It's a Task List on WSS 3 on Win2k3 Enterprise'


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