





<?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>asp.net mail Archives - Netgen IT Solutions</title>
	<atom:link href="https://netgen.in/tag/asp-net-mail/feed/" rel="self" type="application/rss+xml" />
	<link>https://netgen.in/tag/asp-net-mail/</link>
	<description>Your Partner in Everything IT</description>
	<lastBuildDate>Thu, 27 Jun 2024 06:29:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://netgen.in/wp-content/uploads/2024/03/favicon-16x16-1.png</url>
	<title>asp.net mail Archives - Netgen IT Solutions</title>
	<link>https://netgen.in/tag/asp-net-mail/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Configure Asp.net website to send E-mails using SMTP server/Gmail account</title>
		<link>https://netgen.in/configure-asp-net-website-to-send-e-mails-using-smtp-servergmail-account/</link>
		
		<dc:creator><![CDATA[Netgen IT Solutions]]></dc:creator>
		<pubDate>Sat, 30 Aug 2014 06:38:50 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[asp.net mail]]></category>
		<category><![CDATA[send email]]></category>
		<category><![CDATA[send email from website]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[web.config]]></category>
		<guid isPermaLink="false">https://beta.netgen.work/?p=696</guid>

					<description><![CDATA[<p>Configure Asp.net website to send E-mails using SMTP server/Gmail account</p>
<p>The post <a href="https://netgen.in/configure-asp-net-website-to-send-e-mails-using-smtp-servergmail-account/">Configure Asp.net website to send E-mails using SMTP server/Gmail account</a> appeared first on <a href="https://netgen.in">Netgen IT Solutions</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi 🙂<br />
we all are developing websites for ourself, college projects and clients and every website requires the ability to send e-mails on certain events like when a user wishes to contact you for more details on your work or is interested in your services.</p>
<p>It was bit dissicult to send e-mails in<strong> Classic ASP</strong> and<strong> asp.net 1.1</strong> but since the release of Asp.net 2.0 framework sending e-mails is very easy and faster.</p>
<p><strong>Requirements for sending E-mail’s</strong></p>
<ul>
<li>A website (yes, the one you are developing or modifying)</li>
<li>A SMTP Server to send your mails out.</li>
<li>Username, password to authenticate yourself to SMTP server</li>
</ul>
<p><code><strong><br />
public static void SendMail(string MailTo, string MailFrom, string Subject, String MailBody)<br />
{<br />
System.Net.Mail.MailMessage objMailMessage = new System.Net.Mail.MailMessage(<br />
MailFrom, MailTo);<br />
objMailMessage.Subject = Subject;<br />
objMailMessage.IsBodyHtml = true;<br />
objMailMessage.ReplyTo =new MailAddress("username@domain.com");<br />
objMailMessage.Body = MailBody;<br />
SmtpClient objsmtp = new SmtpClient();<br />
objsmtp.EnableSsl = true; // this statement is required in case you are planning to use Gmail account/Google apps account<br />
objsmtp.Send(objMailMessage);<br />
}<br />
</strong> </code></p>
<p>Next You need to use following function to send email to user or yourself. You just need to paas proper arguments and it will take care of rest.</p>
<p><strong><em>After that place following code in your website’s web.config file.</em></strong></p>
<p>&lt;system.net&gt;<br />
&lt;mailSettings&gt;<br />
&lt;smtp from=”username@gmail.com”&gt;<br />
&lt;network host=”smtp.gmail.com” port=”587″ password=”email-password” userName=”username@gmail.com” /&gt;<br />
&lt;/smtp&gt;<br />
&lt;/mailSettings&gt;<br />
&lt;/system.net&gt;</p>
<p>Default port for SMTP server is 25.<br />
For Gmail/Google Apps accounts it is 587.<br />
If above port numbers does not work for you, please ask you e-mail provider about the port number in use.</p>
<p>I hope you find this post useful.<br />
Thank you for reading.</p>
<p>The post <a href="https://netgen.in/configure-asp-net-website-to-send-e-mails-using-smtp-servergmail-account/">Configure Asp.net website to send E-mails using SMTP server/Gmail account</a> appeared first on <a href="https://netgen.in">Netgen IT Solutions</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
