<?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>Hans Rasmussen &#187; ASP</title>
	<atom:link href="http://www.hansrasmussen.com/tag/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hansrasmussen.com</link>
	<description>info@hansrasmussen.com, +46 (0)723 207008</description>
	<lastBuildDate>Wed, 01 Feb 2012 11:59:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Avoiding local maildrop when using CDOSYS</title>
		<link>http://www.hansrasmussen.com/2010/02/avoiding-local-maildrop-when-using-cdosys/</link>
		<comments>http://www.hansrasmussen.com/2010/02/avoiding-local-maildrop-when-using-cdosys/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 23:48:10 +0000</pubDate>
		<dc:creator>Hans Rasmussen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[CDOSYS]]></category>

		<guid isPermaLink="false">http://www.hansrasmussen.com/2010/02/avoiding-local-maildrop-when-using-cdosys/</guid>
		<description><![CDATA[I experienced strange problems with some ASP scripts at a clients hosted web server. The script sends e-mails after completed execution and occasionally (quite often) some of the e-mails are not delivered or are delivered much later than expected. When running in a hosted environment it is also very hard to track as you have [...]]]></description>
			<content:encoded><![CDATA[<p>I experienced strange problems with some ASP scripts at a clients hosted web server. The script sends e-mails after completed execution and occasionally (quite often) some of the e-mails are not delivered or are delivered much later than expected. When running in a hosted environment it is also very hard to track as you have very limited access to the server itself. After digging in some Microsoft documentation I noticed that it is possible to direct the traffic to the SMTP server of your choice instead. CDOSYS will execute a little bit slower but now I have the opportunity to target the e-mail to the SMTP server of my choice.</p>
<p>    Set oCdoMail = Server.CreateObject(&#8220;CDO.Message&#8221;)</p>
<p>    Set oCdoConf = Server.CreateObject(&#8220;CDO.Configuration&#8221;)</p>
<p>    sConfURL = &#8220;<a href="http://schemas.microsoft.com/cdo/configuration/">http://schemas.microsoft.com/cdo/configuration/</a>&#8221;</p>
<p>    with oCdoConf</p>
<p>      .Fields.Item(sConfURL &amp; &#8220;sendusing&#8221;) = 2</p>
<p>      .Fields.Item(sConfURL &amp; &#8220;smtpserver&#8221;) = &#8220;smtp.themailserverofyourchoice.com&#8221;</p>
<p>      .Fields.Item(sConfURL &amp; &#8220;smtpserverport&#8221;) = 25</p>
<p>      .Fields.Item(sConfURL &amp; &#8220;smtpauthenticate&#8221;) = 1 </p>
<p>      .Fields.Item(sConfURL &amp; &#8220;sendusername&#8221;) = &#8220;<a href="mailto:accountname@themailserverofyourchoice.com">accountname@themailserverofyourchoice.com</a>&#8220; </p>
<p>      .Fields.Item(sConfURL &amp; &#8220;sendpassword&#8221;) = &#8220;verysecretpassword&#8221; </p>
<p>      .Fields.Update</p>
<p>    end with</p>
<p> oCdoMail.From = &#8221;<a href="mailto:fromemail@someserver.com">fromemail@someserver.com</a>&#8221;</p>
<p> oCdoMail.To = &#8221;<a href="mailto:toemail@someserver.com">toemail@someserver.com</a>&#8221;</p>
<p> oCdoMail.Subject = &#8221;Subjct of the message&#8221;</p>
<p> oCdoMail.HTMLBody = &#8220;Some message including some HTML coding&#8221;</p>
<p> oCdoMail.Configuration = oCdoConf</p>
<p> oCdoMail.Send</p>
<p> Set oCdoConf = Nothing</p>
<p> Set oCdoMail = Nothing</p>
<p><a href="http://support.microsoft.com/kb/555287">http://support.microsoft.com/kb/555287</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hansrasmussen.com/2010/02/avoiding-local-maildrop-when-using-cdosys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

