<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5517491808989562818</id><updated>2024-10-24T00:50:20.531-07:00</updated><category term="How to Send Email from SharePoint"/><category term="How to programmatically send an email in SharePoint"/><category term="Programatically send email"/><category term="SPUtility"/><category term="SPUtility.SendEmail"/><category term="Send Email in Sharepoint"/><category term="send Email in a Workflow Activity from Sharepoint"/><category term="send email with attachment in sharepoint 2010"/><title type='text'>Sending Email from SharePoint application/WebPart</title><subtitle type='html'>This blog explains how to programmatically send email from sharePoint application or web part.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://emailfromsharepoint.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5517491808989562818/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://emailfromsharepoint.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Narendra</name><uri>http://www.blogger.com/profile/13112817201598525701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9DeunJL3tqvFJaq6MASKFPsv0aHmViCJ1thnEdde0kOb9fpdeh1ooiF6xPqiukdLspnzYlgn3MBHqAIHdZ_1lAGFX0NQb1ckUqZj3e3n5mVEvSVhphcyt1SZ41pcql9o/s220/ProfilePhoto.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5517491808989562818.post-4552632077584280174</id><published>2012-04-22T06:10:00.000-07:00</published><updated>2012-04-26T09:07:01.678-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How to programmatically send an email in SharePoint"/><category scheme="http://www.blogger.com/atom/ns#" term="send Email in a Workflow Activity from Sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="Send Email in Sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="send email with attachment in sharepoint 2010"/><title type='text'>Sending e-mail with attachments from SharePoint</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;Sending email is a key function of enterprises solutions. Inside SharePoint collaboration environment you always need to send email &lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;&quot;&gt;with the required attachments. This can be used in some cases like once your document is approved / updated then through workflow we can send it to all the associated users.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;&quot;&gt;&lt;h3 style=&quot;margin: 10pt 0in 0pt; text-indent: 0.5in;&quot;&gt;
&lt;a href=&quot;&quot; name=&quot;_Toc286673269&quot;&gt;&lt;/a&gt;&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; font-weight: normal; line-height: 115%; mso-fareast-font-family: Calibri;&quot;&gt;One of the ways to send an e-mail from SharePoint as developer is to make use of the “SPUtility.SendEmail” classes. But unfortunately I did not find any possibility to include an attachment with the help of these classes.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; font-weight: normal; line-height: 115%; mso-fareast-font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;margin: 10pt 0in 0pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; font-weight: normal; line-height: 115%; mso-fareast-font-family: Calibri;&quot;&gt;You can easily use the following specified methods to send email with attachment.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;margin: 10pt 0in 0pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; font-weight: normal; line-height: 115%; mso-fareast-font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3 style=&quot;margin: 10pt 0in 0pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; font-weight: normal; line-height: 115%; mso-fareast-font-family: Calibri;&quot;&gt;&lt;h4 style=&quot;margin: 12pt 0in 3pt 0.5in; mso-list: l0 level1 lfo1; mso-text-indent-alt: -.25in; text-indent: -0.5in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: large;&quot;&gt;I.&lt;/span&gt;&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: large;&quot;&gt;Method 1&lt;/span&gt;&lt;/h4&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;Here we are going to use “System.Net.Mail” classes to send a message. Instead of hard coding the SMTP information into the code, we are going to use the SMTP settings that are configured with the SharePoint Central Administration. These settings are found in the “SPAdministrationWebApplication” class&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296434363;&quot;&gt;&lt;span style=&quot;color: #3d3d3d; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 9.5pt;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296434363;&quot;&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 18pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;Below is a brief example on how you can send the mail with attachment from code. If you prefer to use the user’s e-mail address instead of the configured SMTP user you can retrieve it with SPControl.GetContextWeb(Context).CurrentUser.Email.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green;&quot;&gt;//Get the Sharepoint SMTP information from the //SPAdministrationWebApplication&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; strSmtpServer = &lt;span style=&quot;color: #2b91af;&quot;&gt;SPAdministrationWebApplication&lt;/span&gt;.Local.OutboundMailServiceInstance.Server.Address;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; strSmtpFrom = &lt;span style=&quot;color: #2b91af;&quot;&gt;SPAdministrationWebApplication&lt;/span&gt;.Local.OutboundMailSenderAddress;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Create the mail message and supply it with from and to info&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;MailMessage&lt;/span&gt; objMailMessage = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MailMessage&lt;/span&gt;(strSmtpFrom,&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;a href=&quot;mailto:user@gmail.com&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;user@gmail.com&lt;/span&gt;&lt;/a&gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Set the subject and body of the message&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objMailMessage.Subject = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Subject: Testing Sending mail with attachment&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objMailMessage.Body = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;This is Test Mail with a attachment&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Download the content of the file with a WebClient&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;WebClient&lt;/span&gt; webClient = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;WebClient&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Supply the WebClient with the network credentials of our user&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; webClient.Credentials = &lt;span style=&quot;color: #2b91af;&quot;&gt;CredentialCache&lt;/span&gt;.DefaultNetworkCredentials;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;//Download the byte array of the file&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;byte&lt;/span&gt;[] data = webClient.DownloadData(insert_ attachment_url);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;//Dump the byte array in a memory stream because&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;//we can write it to our attachment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;MemoryStream&lt;/span&gt; memoryStreamOfFile = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MemoryStream&lt;/span&gt;(data);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//Add the attachment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objMailMessage.Attachments.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; System.Net.Mail.&lt;span style=&quot;color: #2b91af;&quot;&gt;Attachment&lt;/span&gt;(memoryStreamOfFile, insert_Filenamefor_attachment, insert_content_type));&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Create the SMTP client object and send the message&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;SmtpClient&lt;/span&gt; objSmtpClient = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;SmtpClient&lt;/span&gt;(strSmtpServer);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objSmtpClient.Send(objMailMessage); &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style=&quot;margin: 12pt 0in 3pt 0.5in; mso-list: l0 level1 lfo1; mso-text-indent-alt: -.25in; text-indent: -0.5in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: large;&quot;&gt;II.&lt;/span&gt;&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: large;&quot;&gt;Method 2&lt;/span&gt;&lt;/h4&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;MailMessage&lt;/span&gt; message = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;MailMessage&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-weight: bold;&quot;&gt;();&lt;span style=&quot;color: #2b91af;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//Get the Sharepoint SMTP information from the //SPAdministrationWebApplication&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&lt;/span&gt;message.From = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;MailAddress&lt;/span&gt;(&lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;SPAdministrationWebApplication&lt;/span&gt;.Local.OutboundMailSenderAddress.ToString()); &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;message.To.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; MailAddress(&lt;span style=&quot;color: #943634;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;user@gmail.com&lt;/span&gt;&lt;span style=&quot;color: #943634;&quot;&gt;&quot;&lt;/span&gt;)); &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;message.IsBodyHtml =&lt;span style=&quot;color: blue;&quot;&gt; true&lt;/span&gt;; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;//Set the subject and body of the message&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;message.Body = &lt;span style=&quot;color: #943634;&quot;&gt;&quot;Hi there, check out the attachment&quot;&lt;/span&gt;; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;message.Subject = &lt;span style=&quot;color: #943634;&quot;&gt;&quot;Sent Attachment&quot;&lt;/span&gt;; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (&lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;SPWeb&lt;/span&gt; web = &lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;SPContext&lt;/span&gt;.Current.Web)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;//Get the Document Library from where you want to sed the attachment&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;SPList&lt;/span&gt; splDataSpringsLibrary = web.Lists[&lt;span style=&quot;color: #943634;&quot;&gt;&quot;MyDocuments&quot;&lt;/span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//Get the Url of the file to be sent as an attachment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;string &lt;/span&gt;strUrl = &quot;&lt;span style=&quot;color: blue;&quot;&gt;http://ocs-wks-029:2323/MyDocuments/Configuring Database Mial&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;SQL server 2008.doc&lt;/span&gt;&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//Get the file to be sent as an attachment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;color: #2b91af; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%; mso-bidi-font-weight: bold;&quot;&gt;SPFile&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt; file = splDataSpringsLibrary.ParentWeb.GetFile(strUrl);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//Add the attachment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;message.Attachments.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; Attachment(file.OpenBinaryStream(), file.Name)); &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Create the SMTP client object and send the message&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;SmtpClient&lt;/span&gt; smtpClient = &lt;span style=&quot;color: blue;&quot;&gt;new &lt;/span&gt;SmtpClient(&lt;span style=&quot;color: #2b91af; mso-bidi-font-weight: bold;&quot;&gt;SPAdministrationWebApplication&lt;/span&gt;.Local.OutboundMailServiceInstance.Server.Address);.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;smtpClient.Send(message);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;margin: 10pt 0in 0pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; font-weight: normal; line-height: 115%; mso-fareast-font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3 style=&quot;margin: 10pt 0in 0pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; font-weight: normal; line-height: 115%; mso-fareast-font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3 style=&quot;margin: 10pt 0in 0pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;mso-bookmark: _Toc286673269;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/h3&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://emailfromsharepoint.blogspot.com/feeds/4552632077584280174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://emailfromsharepoint.blogspot.com/2012/04/sending-e-mail-with-attachments-from.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5517491808989562818/posts/default/4552632077584280174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5517491808989562818/posts/default/4552632077584280174'/><link rel='alternate' type='text/html' href='http://emailfromsharepoint.blogspot.com/2012/04/sending-e-mail-with-attachments-from.html' title='Sending e-mail with attachments from SharePoint'/><author><name>Narendra</name><uri>http://www.blogger.com/profile/13112817201598525701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9DeunJL3tqvFJaq6MASKFPsv0aHmViCJ1thnEdde0kOb9fpdeh1ooiF6xPqiukdLspnzYlgn3MBHqAIHdZ_1lAGFX0NQb1ckUqZj3e3n5mVEvSVhphcyt1SZ41pcql9o/s220/ProfilePhoto.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5517491808989562818.post-5516767018375728579</id><published>2012-04-22T05:56:00.000-07:00</published><updated>2012-04-22T05:56:48.765-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How to Send Email from SharePoint"/><category scheme="http://www.blogger.com/atom/ns#" term="Programatically send email"/><category scheme="http://www.blogger.com/atom/ns#" term="SPUtility"/><category scheme="http://www.blogger.com/atom/ns#" term="SPUtility.SendEmail"/><title type='text'>Send Email from SharePoint - SPUtility.SendEmail</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;Sending email is a key function of enterprises solutions. Inside SharePoint collaboration environment you always need to send email from within SharePoint. For this purpose you can use SPUtility class SendEmail method.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-align: left; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;Did you ever need to send an email out, from your SharePoint custom web application? When you have such a task, perhaps the first idea that you have is to use&amp;nbsp;System.Net.Mailnamespace. However, this requires that your application maintains a setting for the SMTP server, reply address and etc.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;&quot;&gt;If you want the task of storing this configuration to SharePoint (and its Administrator) and instead, just focus on sending out the actual email then the solution is the&amp;nbsp;Microsoft.SharePoint.Utilities.SPUtilityclass! It has the very convenient method &#39;SendEmail&#39;. This is basically SharePoint&#39;s native functionality for email delivery.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;The first thing you (or the SharePoint Administrator) need to do is setup the Outgoing email SMTP server. Open&amp;nbsp;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;Central Admin&lt;/b&gt; &lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439813;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Wingdings; font-size: 12pt; mso-ascii-font-family: Arial; mso-bidi-font-family: Arial; mso-char-type: symbol; mso-hansi-font-family: Arial; mso-symbol-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings;&quot;&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439813;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;System Settings&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439813;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Wingdings; font-size: 12pt; mso-ascii-font-family: Arial; mso-bidi-font-family: Arial; mso-char-type: symbol; mso-hansi-font-family: Arial; mso-symbol-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings;&quot;&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439813;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;Configure Outgoing Email&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;There, you need to set the Outbound SMTP server, From address and Reply-to address.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;Now, you actually send email from your code as follows:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;First, it is always a good idea to check if the email server is set:&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439816;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439816;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;bool blnIsEmailServerSet = SPUtility.IsEmailServerSet(web);&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;If this returns false, you should not bother trying to send the email. Instead, show an error message or notify the SharePoint administrator, to check the settings of the server. If it returns true, you are good to go:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 1in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;_Toc296439818&quot;&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 10.5pt;&quot;&gt;SPWeb web = SPContext.Current.Web;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;mso-bookmark: _Toc296439818;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;bool appendHtmlTag = false;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;bool htmlEncode = false;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;string toAddress = &quot;test@example.com&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;string subject = &quot;Subject&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;string message = &quot;Message text&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;bool result = SPUtility.SendEmail(web, appendHtmlTag, htmlEncode, toAddress, subject, message);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 10.5pt;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 1in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;In some cases, you may need to run this code with elevated privileges:&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439819;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;SPSecurity.RunWithElevatedPrivileges(delegate()&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;bool result = SPUtility.SendEmail(web, appendHtmlTag, htmlEncode, toAddress, subject, message);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;b&gt;});&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bookmark: _Toc296439819;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt 0.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;SendEmail method returns a boolean, indicating if sending the email was successful or not.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;margin: 24pt 0in 0pt;&quot;&gt;
&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;As you can see that sending email using SPUtility is straightforward, please also note the following considerations&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;No attachment allowed&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;Message body size cannot exceed 2048 characters.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;The from address will be the “Outbound Sender Address” configured in the central admin.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: 0.5in;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://emailfromsharepoint.blogspot.com/feeds/5516767018375728579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://emailfromsharepoint.blogspot.com/2012/04/send-email-from-sharepoint.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5517491808989562818/posts/default/5516767018375728579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5517491808989562818/posts/default/5516767018375728579'/><link rel='alternate' type='text/html' href='http://emailfromsharepoint.blogspot.com/2012/04/send-email-from-sharepoint.html' title='Send Email from SharePoint - SPUtility.SendEmail'/><author><name>Narendra</name><uri>http://www.blogger.com/profile/13112817201598525701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9DeunJL3tqvFJaq6MASKFPsv0aHmViCJ1thnEdde0kOb9fpdeh1ooiF6xPqiukdLspnzYlgn3MBHqAIHdZ_1lAGFX0NQb1ckUqZj3e3n5mVEvSVhphcyt1SZ41pcql9o/s220/ProfilePhoto.jpg'/></author><thr:total>3</thr:total></entry></feed>