<?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>mango Hosting .com &#187; script</title>
	<atom:link href="http://www.mangohosting.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mangohosting.com</link>
	<description></description>
	<lastBuildDate>Thu, 03 Nov 2011 15:24:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Guía paso a paso para utilizar CDONTS en tu pagina ASP</title>
		<link>http://www.mangohosting.com/2008/05/05/guia-paso-a-paso-para-utilizar-cdonts-en-tu-pagina-asp/</link>
		<comments>http://www.mangohosting.com/2008/05/05/guia-paso-a-paso-para-utilizar-cdonts-en-tu-pagina-asp/#comments</comments>
		<pubDate>Mon, 05 May 2008 03:39:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hosting en Windows]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[CDONTS]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://mangohosting.com/?p=60</guid>
		<description><![CDATA[CDONTS stands for &#8216;Collaboration Data Objects for Windows NT Server&#8217; and as the name suggest it is for NT, sorry Win9x users you don&#8217;t have this component. The CDONTS component is installed when you install IIS on NT4 and Windows 2000. Although the component will run on Windows XP, Microsoft have decided to remove the [...]]]></description>
			<content:encoded><![CDATA[<p>CDONTS stands for <span class="italic">&#8216;Collaboration Data Objects for Windows NT  Server&#8217;</span> and as the name suggest it is for NT, sorry Win9x users you don&#8217;t  have this component. The CDONTS component is installed when you install IIS on  NT4 and Windows 2000. Although the component will run on Windows XP, Microsoft  have decided to remove the component from IIS 5.1 on Windows XP, so you will have  to track down a copy of the cdonts.dll and register it on the IIS web server.</p>
<p>To use this component to send e-mail you also need the SMTP Server that ships  with IIS 4 or 5 installed on the web server. The SMTP server is usually installed  by default with the standard IIS installation.</p>
<p>First we need to create the variables that we are going to be using in this script.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left">&lt;%<br />
<span class="comments">&#8216;Dimension variables</span><br />
Dim objCDOMail     <span class="comments"> &#8216;Holds the CDONTS NewMail Object</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>Next we need to create an instance of the <span class="italic">&#8216;CDONTS NewMail&#8217;</span> object on the server.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Create the e-mail server object</span><br />
Set objCDOMail = Server.CreateObject(&#8220;CDONTS.NewMail&#8221;)</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>Once the<span class="italic"> &#8216;NewMail&#8217;</span> object has been created on the server  we can use various properties and methods of the <span class="italic">&#8216;NewMail&#8217;</span> object to build the e-mail.</p>
<p>First we are going to use the <span class="italic">&#8216;From&#8217;</span> property to let the recipient of  the e-mail know who the e-mail is from. If you leave this property out or do not  have a properly format e-mail address the e-mail will fail.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="12" align="left"><span class="comments">&#8216;Who the e-mail is from</span><br />
objCDOMail.From = &#8220;myE-mailHere@myDomain.com&#8221;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>Now we need to place a string value representing the e-mail address of the person  you want to receive the e-mail into the <span class="italic">&#8216;To&#8217;</span> property  of the <span class="italic">&#8216;NewMail&#8217;</span> object.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" align="left"><span class="comments">&#8216;Who the e-mail is sent to</span><br />
objCDOMail.To = &#8220;thereEmail@thereDomain.com&#8221;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>The next property<span class="italic"> &#8216;Cc&#8217;</span> holds the e-mail address of the  people you wish to receive Carbon Copies of the e-mail.</p>
<p>You can place one or more recipient e-mail addresses separated by either a comma  (,) or a semicolon (;). Make sure all the e-mail address are properly formatted  or the e-mail will fail.</p>
<p>This property can be left out if you don&#8217;t want any carbon copies of the e-mail  sent.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Who the carbon copies are sent to</span><br />
objCDOMail.Cc = &#8220;myFriend1@thereDomain.com;myFriend2@anotherDomain.com&#8221;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>The <span class="italic">&#8216;Bcc&#8217;</span> property holds the e-mail address of the people  you wish to receive Blind Copies of the e-mail. The formatting of the e-mail addresses  is the same as for the <span class="italic">&#8216;Cc&#8217;</span> property above.</p>
<p>Again if you don&#8217;t want to send any blind copies of the message you can leave  this property out.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Who the blind copies are sent to</span><br />
objCDOMail.Bcc = &#8220;myFriend1@thereDomain.com;myFriend2@anotherDomain.com&#8221;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>In the next line we use the<span class="italic"> &#8216;Subject&#8217;</span> property to set  the subject of the e-mail.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Set the subject of the e-mail</span><br />
objCDOMail.Subject = &#8220;Enquiry sent from my web site&#8221;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>As well as sending plain text e-mail&#8217;s you can also format the body of the e-mail  using HTML. The default is Text but if you wish to format the e-mail using HTML  then you will need to use the <span class="italic">&#8216;BodyFormat&#8217;</span> property  with the integer value of<span class="italic"> &#8217;0&#8242;</span> for HTML or<span class="italic"> &#8217;1&#8242;</span> for Text.</p>
<p>If you leave this property out the e-mail will be sent as plain text format.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Set the e-mail body format (0=HTML                  1=Text)</span><br />
objCDOMail.BodyFormat = 0</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>If you wish to use HTML formatting in the e-mail, as well as setting the <span class="italic">&#8216;BodyFormat&#8217;</span> property above to HTML, you will also need to set the<span class="italic"> &#8216;MailFormat&#8217;</span> property to MIME. Again this  property uses and integer value of <span class="italic">&#8217;0&#8242;</span> for MIME and<span class="italic"> &#8217;1&#8242;</span> for Text.</p>
<p>The default is text so if your e-mail is text only you can leave this property  out.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Set the mail format (0=MIME 1=Text)</span><br />
objCDOMail.MailFormat = 0</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>The next property were covering is the <span class="italic">&#8216;Body&#8217;</span> property. This property holds the  main part of the e-mail with the message you are sending.</p>
<p>If you have set the <span class="italic">&#8216;BodyFormat&#8217;</span> property to HTML and the <span class="italic">&#8216;MailFormat&#8217;</span> to MIME then you can use HTML to format your e-mail message. <span class="italic">&#8216;eg. &lt;h2&gt;Hello&lt;/h2&gt;&lt;br&gt;&lt;b&gt;This  is my e-mail in HTML format&lt;/b&gt;&#8217;</span>.</p>
<p>If you want to send the e-mail as text then you can just enter text instead. <span class="italic">&#8216;eg. Hello This is my e-mail in Text format&#8217;</span>.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Set the main body of the e-mail</span><br />
objCDOMail.Body = &#8220;&lt;h2&gt;Hello&lt;/h2&gt;&lt;br&gt;&lt;b&gt;This                  is my e-mail in HTML format&lt;/b&gt;&#8221;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>The <span class="italic">&#8216;Importance&#8217;</span> property tells the mail messaging system  when to schedule delivery of the e-mail.</p>
<p>For this property there is 3 different integer values, <span class="italic">0 &#8211;  Low</span>, the e-mail will be sent during times of low system use, <span class="italic">1  &#8211; Normal</span>, the message is sent at regular delivery times, <span class="italic">2  &#8211; High</span>, the system will attempt to send the message immediately.</p>
<p>If this property is left out the deafault is Normal.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" height="27" align="left"><span class="comments">&#8216;Importance of the e-mail (0=Low,                  1=Normal, 2=High)</span><br />
objCDOMail.Importance = 1</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>Once all the properties for the e-mail are set we can now send the e-mail using  the<span class="italic"> &#8216;Send&#8217;</span> property.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" align="left"><span class="comments">&#8216;Send the e-mail</span><br />
objCDOMail.Send</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>Finally once the e-mail has been sent we can close the server object releasing  server resources.</p>
<table border="0" cellspacing="0" cellpadding="1" width="99%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#f8f8f8">
<tbody>
<tr>
<td class="code" align="left"><span class="comments">&#8216;Close the server object</span><br />
Set objCDOMail = Nothing<br />
%&gt;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>There are other methods and properties of the <span class="italic">&#8216;NewMail CDONTS&#8217;</span> object but to keep things  simple I have tried to cover the most common properties needed to send an e-mail  from your web site.</p>

<p class="FacebookLikeButton"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mangohosting.com%2F2008%2F05%2F05%2Fguia-paso-a-paso-para-utilizar-cdonts-en-tu-pagina-asp%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;locale=en_US" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height: 60px"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mangohosting.com/2008/05/05/guia-paso-a-paso-para-utilizar-cdonts-en-tu-pagina-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

