<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to pass request context to ActionMailer and supply the :host value to url_for</title>
	<atom:link href="http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/</link>
	<description>Simone Carletti&#039;s personal ramblings on programming, syndication, search engines &#38; marketing.</description>
	<lastBuildDate>Fri, 05 Mar 2010 23:32:59 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-8533</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 05 Feb 2010 19:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-8533</guid>
		<description>Correct, you&#039;ll get host names from some requests polluting host names in other requests. Not thread safe!</description>
		<content:encoded><![CDATA[<p>Correct, you&#8217;ll get host names from some requests polluting host names in other requests. Not thread safe!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin George</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-5734</link>
		<dc:creator>Justin George</dc:creator>
		<pubDate>Thu, 05 Nov 2009 07:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-5734</guid>
		<description>I solved this by overriding the default_url_options method. You can then have it do whatever backflips you want to obtain the value, no duck typing or lambdas required.

I&#039;ll submit a pull request after I convert your plugin to do that, it looks like a nice way to deal with that pain-in-the-ass problem.</description>
		<content:encoded><![CDATA[<p>I solved this by overriding the default_url_options method. You can then have it do whatever backflips you want to obtain the value, no duck typing or lambdas required.</p>
<p>I&#8217;ll submit a pull request after I convert your plugin to do that, it looks like a nice way to deal with that pain-in-the-ass problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simone Carletti</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-5727</link>
		<dc:creator>Simone Carletti</dc:creator>
		<pubDate>Wed, 04 Nov 2009 22:22:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-5727</guid>
		<description>For example, I need to send an email each time a new record Message is created. Because I use an observer, the observer doesn&#039;t know anything about the request context.</description>
		<content:encoded><![CDATA[<p>For example, I need to send an email each time a new record Message is created. Because I use an observer, the observer doesn&#8217;t know anything about the request context.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-5726</link>
		<dc:creator>john</dc:creator>
		<pubDate>Wed, 04 Nov 2009 22:05:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-5726</guid>
		<description>What do you do with mail that needs to be sent outside of the context of a controller / request?

For example, you might want to write a class that sends mail from a script (script/runner...)</description>
		<content:encoded><![CDATA[<p>What do you do with mail that needs to be sent outside of the context of a controller / request?</p>
<p>For example, you might want to write a class that sends mail from a script (script/runner&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars O. Overskeid</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-5712</link>
		<dc:creator>Lars O. Overskeid</dc:creator>
		<pubDate>Wed, 04 Nov 2009 12:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-5712</guid>
		<description>Thank you for a good solution to this challenge! I needed this for one of my tasks this afternoon, and luckily I found this on reddit before re-inventing the wheel :)</description>
		<content:encoded><![CDATA[<p>Thank you for a good solution to this challenge! I needed this for one of my tasks this afternoon, and luckily I found this on reddit before re-inventing the wheel :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caffeine Driven Development &#187; Blog Archive &#187; L33t Links #34</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-5535</link>
		<dc:creator>Caffeine Driven Development &#187; Blog Archive &#187; L33t Links #34</dc:creator>
		<pubDate>Thu, 29 Oct 2009 07:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-5535</guid>
		<description>[...] How to pass request context to ActionMailer and supply the :host value to url_for, I actually had this exact problem [...]</description>
		<content:encoded><![CDATA[<p>[...] How to pass request context to ActionMailer and supply the :host value to url_for, I actually had this exact problem [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simone Carletti</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-5514</link>
		<dc:creator>Simone Carletti</dc:creator>
		<pubDate>Wed, 28 Oct 2009 18:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-5514</guid>
		<description>AFAIK, that solution should not be thread-safe. :(</description>
		<content:encoded><![CDATA[<p>AFAIK, that solution should not be thread-safe. :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Hallstrom</title>
		<link>http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/#comment-5512</link>
		<dc:creator>Philip Hallstrom</dc:creator>
		<pubDate>Wed, 28 Oct 2009 18:15:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=663#comment-5512</guid>
		<description>I&#039;ve always had luck putting the following in a before_filter in ApplicationController.

ActionMailer::Base.default_url_options[:host] = request.host_with_port

Granted this doesn&#039;t solve the problem of sending emails outside of the website (ie. via runner or console) but it seems to work fine for emails triggered by web actions.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve always had luck putting the following in a before_filter in ApplicationController.</p>
<p>ActionMailer::Base.default_url_options[:host] = request.host_with_port</p>
<p>Granted this doesn&#8217;t solve the problem of sending emails outside of the website (ie. via runner or console) but it seems to work fine for emails triggered by web actions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
