<?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>Gulics.com &#187; Web of Metal</title>
	<atom:link href="http://blog.gulics.com/category/web-of-metal/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gulics.com</link>
	<description>Metal, Movies, Web Development, and More</description>
	<lastBuildDate>Wed, 29 Jun 2011 14:42:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>ActionMailer, DreamHost and &#8220;hostname was not match with the server certificate&#8221;</title>
		<link>http://blog.gulics.com/2009/03/22/actionmailer-dreamhost-and-hostname-was-not-match-with-the-server-certificate/</link>
		<comments>http://blog.gulics.com/2009/03/22/actionmailer-dreamhost-and-hostname-was-not-match-with-the-server-certificate/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 23:46:15 +0000</pubDate>
		<dc:creator>Stephen Gulics</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Web of Metal]]></category>
		<category><![CDATA[ActionMailer]]></category>

		<guid isPermaLink="false">http://blog.gulics.com/?p=11</guid>
		<description><![CDATA[Today I wanted to add a simple Suggestion Box to Web of Metal. I planned out about 2 hours of my Sunday since the only unknown that I thought I would have to deal with was setting up the ActionMailer for Dreamhost. A quick google search and I found a simple post on Dreamhost&#8217;s Wiki. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to add a simple Suggestion Box to <a href="http://www.webofmetal.com" target="_blank">Web of Metal</a>. I planned out about 2 hours of my Sunday since the only unknown that I thought I would have to deal with was setting up the ActionMailer for Dreamhost.</p>
<p>A quick google search and I found a simple post on Dreamhost&#8217;s <a href="http://wiki.dreamhost.com/ActionMailer" target="_blank">Wiki</a>. So I configured my settings locally and successfully sent the email. These are the settings that I used:</p>
<pre name="code" class="ruby">
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address          =&gt; 'mail.domain.com',
:port                =&gt; 25,
:domain           =&gt; 'domain.com',
:user_name        =&gt; 'mailer@domain.com',
:password         =&gt; 'password',
:authentication   =&gt; :login,
}
</pre>
<p>After adding the settings to my environment.rb I did a quick test and everything worked. &#8220;Great!&#8221; I said, so now lets move the code to Dreamhost. And that&#8217;s were it all went downhill.</p>
<p>The functionality did not work in production. I looked at the logs and found the following error in the log:</p>
<pre>HomeController:rescue_action_without_handler:hostname was not match with the server certificate</pre>
<p>Ugh. To make a long story short it looks like a problem in Rails 2.2.2 with SSL  on the mailserver. It seems that Rails 2.2.2 automatically turns on something called STARTTLS if your using Ruby 1.8.7 and your SMTP server supports STARTTLS. Well I guess Dreamhost&#8217;s SMTP server supports it because it&#8217;s definitely turned it on. According to Dan Ryan in this <a href="http://rails.lighthouseapp.com/projects/8994/tickets/1491-ssl-problem-with-smtp-in-222" target="_blank">post </a></p>
<blockquote><p>&#8220;You&#8217;ll see this error if your mailserver has an SSL certificate set up for a hostname other than the one to which you are trying to connect. I was experiencing the same error, until I changed my smtp_settings to reflect the hostname of the associated SSL cert.&#8221;</p></blockquote>
<p>This issue is going to be <a href="http://rails.lighthouseapp.com/projects/8994/tickets/1731" target="_blank">fixed</a> in Rails 2.3 but since I am using 2.2.2, I needed a way to turn it off now. I guess I could of wrote a plugin using the information found in the <a href="http://rails.lighthouseapp.com/projects/8994/tickets/1491-ssl-problem-with-smtp-in-222" target="_blank">post</a> above but I found it just as easy to  modify the Rails code. I know, that is a bad practice but I did not feel like wasting any more of my time and my Sunday with this issue. Since Rails is frozen in my vendor directory I just modified vendor/rails/lib/action_mailer/base.rb</p>
<pre class="brush: ruby;">
def perform_delivery_smtp(mail)
  destinations = mail.destinations
  mail.ready_to_send
  sender = mail['return-path'] || mail.from
  smtp = Net::SMTP.new(smtp_settings[:address], smtp_settings[:port])
  # Comment out the following to fix the &quot;hostname was not match with the server certificate&quot;
  # smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
  smtp.start(smtp_settings[:domain], smtp_settings[:user_name], smtp_settings[:password],
  smtp_settings[:authentication]) do |smtp|
  smtp.sendmail(mail.encoded, sender, destinations)
end
</pre>
<p>Hope this helps anyone else having the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gulics.com/2009/03/22/actionmailer-dreamhost-and-hostname-was-not-match-with-the-server-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web of Metal in beta</title>
		<link>http://blog.gulics.com/2009/03/20/web-of-metal-in-beta/</link>
		<comments>http://blog.gulics.com/2009/03/20/web-of-metal-in-beta/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 16:04:31 +0000</pubDate>
		<dc:creator>Stephen Gulics</dc:creator>
				<category><![CDATA[Web of Metal]]></category>

		<guid isPermaLink="false">http://blog.gulics.com/?p=4</guid>
		<description><![CDATA[I finally stopped procrastinating and released Web of Metal. The site aggregate reviews from the the web&#8217;s best Metal and Progressive music reviews sites to help people find new music. It&#8217;s still in beta but I figured it&#8217;s good enough to get out there. I was able to import over 28,000 reviews from the following [...]]]></description>
			<content:encoded><![CDATA[<p>I finally stopped procrastinating and released <a title="Web of Metal" href="http://www.webofmetal.com" target="_blank">Web of Metal</a>. The site  aggregate reviews from the the web&#8217;s best Metal and Progressive music reviews sites to help people find new music. It&#8217;s still in beta but I figured it&#8217;s good enough to get out there.</p>
<p>I was able to import over 28,000 reviews from the following sites:</p>
<ul>
<li><a href="http://www.lordsofmetal.nl/index.php?lang=en" target="_blank">Lords of Metal</a></li>
<li><a href="http://www.revelationz.net/" target="_blank">Revelationz Magazine</a></li>
<li><a href="http://www.metalreviews.com/" target="_blank">Metal Reviews</a></li>
<li><a href="http://www.metalstorm.ee/home/index.php" target="_self">Metal Storm</a></li>
</ul>
<p>My TODO&#8217;s are:</p>
<ul>
<li>Get Google and Yahoo to index the site. I submitted them last week and I am still waiting.</li>
<li>Add Contact Us functionality to allow user&#8217;s to submit comments and suggestions</li>
<li>Use JQuery instead of prototype</li>
<li>Import <a href="http://www.metalcrypt.com/" target="_blank">Metal Crypt</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.gulics.com/2009/03/20/web-of-metal-in-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

