<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Luigi Melisi &#187; ReturnMessage</title>
	<atom:link href="http://www.luigimelisi.com/tag/returnmessage/feed" rel="self" type="application/rss+xml" />
	<link>http://www.luigimelisi.com</link>
	<description>Development Blog : C# Code Samples,.NET Tips and Tricks</description>
	<lastBuildDate>Thu, 03 Mar 2011 09:01:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>[VB.NET] : Inviare una mail in formato HTML</title>
		<link>http://www.luigimelisi.com/tips-and-tricks/vb-net-inviare-una-mail-in-formato-html.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vb-net-inviare-una-mail-in-formato-html</link>
		<comments>http://www.luigimelisi.com/tips-and-tricks/vb-net-inviare-una-mail-in-formato-html.html#comments</comments>
		<pubDate>Sat, 20 Mar 2010 00:58:34 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[background color]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[body background]]></category>
		<category><![CDATA[ByVal]]></category>
		<category><![CDATA[dim]]></category>
		<category><![CDATA[document write]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[host ip]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailmessage]]></category>
		<category><![CDATA[MessageBody]]></category>
		<category><![CDATA[MessageHead]]></category>
		<category><![CDATA[ReturnMessage]]></category>
		<category><![CDATA[sans serif font]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=713</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<pre class="brush: vb; title: ; notranslate">
Function SendEmail(ByVal ToAddress As String, ByVal FromAddress As String, ByVal MessageSubject As String, ByVal MessageBody As String)
Dim MessageHead As String = &quot;&lt;html&gt;&lt;head&gt;&quot;
MessageHead = MessageHead &amp; &quot;&lt;style &quot;
MessageHead = MessageHead &amp; &quot;body {background-color:#F7F7F7; color:#000; font-family:arial,verdana,sans-serif; font-size:12px;}&quot;
MessageHead = MessageHead &amp; &quot;&lt;/style&gt;&lt;/head&gt;&lt;/body&gt;&quot;
Dim MessageFoot As String = &quot;&lt;/body&gt;&lt;/html&gt;&quot;
MessageBody = MessageHead &amp; MessageBody &amp; MessageFoot
Dim ReturnMessage As String = &quot;&quot;
Dim mm As New MailMessage(FromAddress, ToAddress)
Dim smtp As New SmtpClient
mm.Subject = MessageSubject
mm.Body = MessageBody
mm.IsBodyHtml = True
Try
smtp.Host = &quot;0.0.0.0&quot; 'ADD HOST IP
smtp.Send(mm)
ReturnMessage = &quot;La mail è stata inviata&quot;
Catch ex As Exception
ReturnMessage = &quot;Spiacente, c’è stato un problema! &quot; &amp;amp; ex.Message
End Try
SendEmail = ReturnMessage
End Function
</pre>
<p><a rel="nofollow" href="http://www.youbuy.it/lastminute.aspx" target="_blank"><img class="aligncenter" title="YouBuy.it - Last Minute - Offerte Sottocosto" src="http://images.youbuy.it/adv/last.jpg" alt="last [VB.NET] : Inviare una mail in formato HTML" width="450" height="600" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/tips-and-tricks/vb-net-inviare-una-mail-in-formato-html.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

