<?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>Web Development - Web Development Tutorial for Developer&#039;s, Asp.net Tutorial, PHP Development, Wordpress Integration &#187; Email</title>
	<atom:link href="http://www.solutions4ever.net/category/email/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solutions4ever.net</link>
	<description>Web Development Solutions Provider</description>
	<lastBuildDate>Fri, 03 Sep 2010 11:45:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Send HTML formatted mail in php</title>
		<link>http://www.solutions4ever.net/2010/04/send-html-formate-mail-in-php/</link>
		<comments>http://www.solutions4ever.net/2010/04/send-html-formate-mail-in-php/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 04:35:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Email]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=166</guid>
		<description><![CDATA[<p>&#60; ? php
//define the receiver of the email
$to = &#8216;youremail@testmail.com&#8217;;
//define the subject of the email
$subject = &#8216;Test HTML email&#8217;;
//create a boundary string. It must be unique
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date(&#8216;r&#8217;, time()));
//define the headers we want passed. Note that they are separated with  ... <a href="http://www.solutions4ever.net/2010/04/send-html-formate-mail-in-php/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p>&lt; ? php<br />
//define the receiver of the email<br />
$to = &#8216;youremail@testmail.com&#8217;;<br />
//define the subject of the email<br />
$subject = &#8216;Test HTML email&#8217;;<br />
//create a boundary string. It must be unique<br />
//so we use the MD5 algorithm to generate a random hash<br />
$random_hash = md5(date(&#8216;r&#8217;, time()));<br />
//define the headers we want passed. Note that they are separated with \r\n<br />
$headers = &#8220;From: webmaster@testmail.com\r\nReply-To: webmaster@testmail.com&#8221;;<br />
//add boundary string and mime type specification<br />
$headers .= &#8220;\r\nContent-Type: multipart/alternative; boundary=\&#8221;PHP-alt-&#8221;.$random_hash.&#8221;\&#8221;";<br />
//define the body of the message.<br />
ob_start(); //Turn on output buffering<br />
? &gt;</p>
<p>&#8211;PHP-alt-&lt; ? php echo $random_hash; ? &gt;<br />
Content-Type: text/plain; charset=&#8221;iso-8859-1&#8243;<br />
Content-Transfer-Encoding: 7bit</p>
<p>Hello World!!!<br />
This is simple text email message.</p>
<p>&#8211;PHP-alt-&lt; ? php echo $random_hash; ? &gt;<br />
Content-Type: text/html; charset=&#8221;iso-8859-1&#8243;<br />
Content-Transfer-Encoding: 7bit</p>
<p>&lt;h2&gt;Hello World!&lt;/h2&gt;<br />
&lt;p&gt;This is something with &lt;b&gt;HTML&lt;/b&gt; formatting.&lt;/p&gt;</p>
<p>&#8211;PHP-alt-&lt; ? php echo $random_hash; ? &gt;&#8211;<br />
&lt; ?<br />
//copy current buffer contents into $message variable and delete current output buffer<br />
$message = ob_get_clean();<br />
//send the email<br />
$mail_sent = @mail( $to, $subject, $message, $headers );<br />
//if the message is sent successfully print &#8220;Mail sent&#8221;. Otherwise print &#8220;Mail failed&#8221;<br />
echo $mail_sent ? &#8220;Mail sent&#8221; : &#8220;Mail failed&#8221;;<br />
? &gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/04/send-html-formate-mail-in-php/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Send mail from ASP.NET using your gmail account</title>
		<link>http://www.solutions4ever.net/2010/02/send-mail-from-asp-net-using-your-gmail-account/</link>
		<comments>http://www.solutions4ever.net/2010/02/send-mail-from-asp-net-using-your-gmail-account/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:25:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Email]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=56</guid>
		<description><![CDATA[<p>This article demonstrate that how to send a mail in aspl.net using your gmail account. You can also use other mail account as follow these instructions.</p>
<p>However, one thing the function can&#8217;t do is SSL authentication. Lets add that:</p>
<p>public static void SendMail(string sHost, int nPort,
string sUserName, string sPassword, string sFromName,
string sFromEmail,  ... <a href="http://www.solutions4ever.net/2010/02/send-mail-from-asp-net-using-your-gmail-account/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p>This article demonstrate that how to send a mail in aspl.net using your gmail account. You can also use other mail account as follow these instructions.</p>
<p>However, one thing the function can&#8217;t do is SSL authentication. Lets add that:</p>
<p>public static void SendMail(string sHost, int nPort,<br />
string sUserName, string sPassword, string sFromName,<br />
string sFromEmail, string sToName,<br />
string sToEmail, string sHeader,<br />
string sMessage, bool fSSL)<br />
{<br />
if (sToName.Length == 0)<br />
sToName = sToEmail;<br />
if (sFromName.Length == 0)<br />
sFromName = sFromEmail;</p>
<p>System.Web.Mail.MailMessage Mail = new System.Web.Mail.MailMessage();<br />
Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = sHost;<br />
Mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;</p>
<p>Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = nPort.ToString();<br />
if ( fSSL )<br />
Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpusessl"] = &#8220;true&#8221;;</p>
<p>if (sUserName.Length == 0)<br />
{<br />
//Ingen auth<br />
}<br />
else<br />
{<br />
Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;<br />
Mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = sUserName;<br />
Mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = sPassword;<br />
}</p>
<p>Mail.To = sToEmail;<br />
Mail.From = sFromEmail;<br />
Mail.Subject = sHeader;<br />
Mail.Body = sMessage;<br />
Mail.BodyFormat = System.Web.Mail.MailFormat.Html;</p>
<p>System.Web.Mail.SmtpMail.SmtpServer = sHost;<br />
System.Web.Mail.SmtpMail.Send(Mail);<br />
}</p>
<p>Now, the secret is the last parameter, bool fSSL. If true then we set the magic CDO field cdo/configuration/smtpusessl to true:</p>
<p>if ( fSSL )<br />
Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpusessl"] = &#8220;true&#8221;;</p>
<p>If you have SSL authentication pass last parameter true. Which gmail for example uses so look at this example:</p>
<p>SendMail(&#8220;smtp.gmail.com&#8221;,<br />
465,<br />
&#8220;account@gmail.com&#8221;,<br />
&#8220;&#8221;,<br />
&#8220;Your name&#8221;,<br />
&#8220;account@gmail.com&#8221;,<br />
&#8220;Stefan Receiver&#8221;,<br />
&#8220;receive@whatever.com&#8221;,<br />
&#8220;Test&#8221;,<br />
&#8220;Hello there Steff!&#8221;,<br />
true);</p>
<p>So secret to get mail working against gmail is: port 465 &#8211; server smtp.gmail.com and ssl = true.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/send-mail-from-asp-net-using-your-gmail-account/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Sending Email with ASP.NET</title>
		<link>http://www.solutions4ever.net/2010/02/sending-email-with-asp-net/</link>
		<comments>http://www.solutions4ever.net/2010/02/sending-email-with-asp-net/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Email]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=51</guid>
		<description><![CDATA[<p>Asp.net provide a simple way to sending mail. You can implement mail code in you application following type.</p>
 
using System.Web.Mail;
 
public partial class contact_us : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        sendmailfunc();
    }
    public void sendmailfunc()
    {
        string text = &#8220;&#8221;;
        text = text + &#8220;Hello ! this is a  ... <a href="http://www.solutions4ever.net/2010/02/sending-email-with-asp-net/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p>Asp.net provide a simple way to sending mail. You can implement mail code in you application following type.</p>
<div> </div>
<div><strong>using System.Web.Mail;</strong></div>
<div><strong> </strong></div>
<div><strong>public partial class contact_us : System.Web.UI.Page</strong></div>
<div><strong>{</strong></div>
<div><strong>    protected void Page_Load(object sender, EventArgs e)</strong></div>
<div><strong>    {</strong></div>
<div><strong>        sendmailfunc();</strong></div>
<div><strong>    }</strong></div>
<div><strong>    public void sendmailfunc()</strong></div>
<div><strong>    {</strong></div>
<div><strong>        string text = &#8220;&#8221;;</strong></div>
<div><strong>        text = text + &#8220;<strong>Hello ! this is a test mail </strong></strong></p>
<div><strong> </strong></div>
<div><strong>        System.Web.Mail.MailMessage objMail = new System.Web.Mail.MailMessage();</strong></div>
<div><strong>        objMail.To = &#8220;text@testmail.com&#8221;;</strong></div>
<div><strong>        objMail.Bcc = &#8220;dinesh2k20@gmail.com&#8221;;</strong></div>
<div><strong>        objMail.Subject = &#8220;Website Enquiry:&#8221;;</strong></div>
<div><strong>        objMail.Body = text;</strong></div>
<div><strong>        objMail.BodyFormat = MailFormat.Html;</strong></div>
<div><strong>        objMail.From = &#8221; text@testmail.com &#8220;;</strong></div>
<div><strong> </strong></div>
<div><strong>        try</strong></div>
<div><strong>        {</strong></div>
<div><strong>            SmtpMail.Send(objMail);           </strong></div>
<div><strong>        }</strong></div>
<div><strong>        catch</strong></div>
<div><strong>        {                     </strong></div>
<div><strong>        }</strong></div>
<div><strong>    }</strong></div>
<div><strong>}</strong></div>
</div>
<p>&#8220;;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/sending-email-with-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
