<?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"
	>
<channel>
	<title>Comments on: How to send SMTP mail in Ruby using ActionMailer (outside Rails)</title>
	<atom:link href="http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/</link>
	<description>Random braindumps vaguely related to coding</description>
	<pubDate>Mon, 01 Dec 2008 18:29:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Hasmukh</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-110</link>
		<dc:creator>Hasmukh</dc:creator>
		<pubDate>Fri, 21 Dec 2007 13:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-110</guid>
		<description>Can u tell me how can we schedule email using action mailer? According to this mail is going, no problem. But i want to schedule means i want to set date and time to send mail.
Thanks.</description>
		<content:encoded><![CDATA[<p>Can u tell me how can we schedule email using action mailer? According to this mail is going, no problem. But i want to schedule means i want to set date and time to send mail.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mohamed</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-100</link>
		<dc:creator>mohamed</dc:creator>
		<pubDate>Sun, 21 Oct 2007 19:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-100</guid>
		<description>Actually this program is  working fine in Windows but not in Linux (CentOS 4.0 or newer),It throws an error like uninitialized constant ActionController::Base&lt;br/&gt;&lt;br/&gt;Can anybody tell me what is the problem with that?</description>
		<content:encoded><![CDATA[<p>Actually this program is  working fine in Windows but not in Linux (CentOS 4.0 or newer),It throws an error like uninitialized constant ActionController::Base</p>
<p>Can anybody tell me what is the problem with that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Outta</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-97</link>
		<dc:creator>Outta</dc:creator>
		<pubDate>Mon, 01 Oct 2007 14:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-97</guid>
		<description>Thank you!</description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Doherty</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-94</link>
		<dc:creator>Julian Doherty</dc:creator>
		<pubDate>Sat, 29 Sep 2007 00:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-94</guid>
		<description>Outta - It's a little more complicated. Using ActionMailer, you would need to set up an .rhtml template, and set the content type of the message to text/html (not the attachment as I've done here).&lt;br/&gt;&lt;br/&gt;Check out http://api.rubyonrails.com/classes/ActionMailer/Base.html for more info.</description>
		<content:encoded><![CDATA[<p>Outta - It&#8217;s a little more complicated. Using ActionMailer, you would need to set up an .rhtml template, and set the content type of the message to text/html (not the attachment as I&#8217;ve done here).</p>
<p>Check out <a href="http://api.rubyonrails.com/classes/ActionMailer/Base.html" rel="nofollow">http://api.rubyonrails.com/classes/ActionMailer/Base.html</a> for more info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Outta</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-93</link>
		<dc:creator>Outta</dc:creator>
		<pubDate>Fri, 28 Sep 2007 20:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-93</guid>
		<description>Great article has helped me quite a bit.  I have a question though, how could I get this to work so it would send  link in the body of the email instead of an attachment?&lt;br/&gt;&lt;br/&gt;I'm looking to do something like &lt;a HREF="http://linkSomewhere" REL="nofollow"&gt;link&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I can get http://linkSomewhere in the e-mail but when I add any tags it just becomes regular text.&lt;br/&gt;&lt;br/&gt;Thanks for any help&lt;br/&gt;&lt;br/&gt;Ray</description>
		<content:encoded><![CDATA[<p>Great article has helped me quite a bit.  I have a question though, how could I get this to work so it would send  link in the body of the email instead of an attachment?</p>
<p>I&#8217;m looking to do something like <a HREF="http://linkSomewhere" REL="nofollow">link</a></p>
<p>I can get <a href="http://linkSomewhere" rel="nofollow">http://linkSomewhere</a> in the e-mail but when I add any tags it just becomes regular text.</p>
<p>Thanks for any help</p>
<p>Ray</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Doherty</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-78</link>
		<dc:creator>Julian Doherty</dc:creator>
		<pubDate>Thu, 02 Aug 2007 12:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-78</guid>
		<description>Great. Glad to help out Gunnar :)&lt;br/&gt;&lt;br/&gt;The other ways to get rubygems working, is to start ruby with the -rubygems argument, or to export RUBYOPT=rubygems as an environment variable.</description>
		<content:encoded><![CDATA[<p>Great. Glad to help out Gunnar <img src='http://www.rawblock.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The other ways to get rubygems working, is to start ruby with the -rubygems argument, or to export RUBYOPT=rubygems as an environment variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gunnar Widell</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-77</link>
		<dc:creator>Gunnar Widell</dc:creator>
		<pubDate>Thu, 02 Aug 2007 10:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-77</guid>
		<description>Thanks for your help Julian,&lt;br/&gt;&lt;br/&gt;I had to do a require 'rubygems' as well.&lt;br/&gt;&lt;br/&gt;I now have a working send .jpg script! I also have mail notification via SMS, when the e-mail arrives...&lt;br/&gt;&lt;br/&gt;Remaining:&lt;br/&gt;crontab job that scans for new .jpg, and send the mail. Or, scan for .jpg, send e-mail, move .jpg to archive.&lt;br/&gt;&lt;br/&gt;This is great!</description>
		<content:encoded><![CDATA[<p>Thanks for your help Julian,</p>
<p>I had to do a require &#8216;rubygems&#8217; as well.</p>
<p>I now have a working send .jpg script! I also have mail notification via SMS, when the e-mail arrives&#8230;</p>
<p>Remaining:<br />crontab job that scans for new .jpg, and send the mail. Or, scan for .jpg, send e-mail, move .jpg to archive.</p>
<p>This is great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Doherty</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-76</link>
		<dc:creator>Julian Doherty</dc:creator>
		<pubDate>Wed, 01 Aug 2007 21:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-76</guid>
		<description>For the SMTP auth to work, http://am.rubyonrails.com/classes/ActionMailer/Base.html has the details on how ActionMailer can be configured.&lt;br/&gt;&lt;br/&gt;Basically, in the smtp_settings call in the original example, you'd want to pass in values for :domain, :user_name, :password, and possibly :authentication</description>
		<content:encoded><![CDATA[<p>For the SMTP auth to work, <a href="http://am.rubyonrails.com/classes/ActionMailer/Base.html" rel="nofollow">http://am.rubyonrails.com/classes/ActionMailer/Base.html</a> has the details on how ActionMailer can be configured.</p>
<p>Basically, in the smtp_settings call in the original example, you&#8217;d want to pass in values for :domain, :user_name, :password, and possibly :authentication</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Doherty</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-75</link>
		<dc:creator>Julian Doherty</dc:creator>
		<pubDate>Wed, 01 Aug 2007 21:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-75</guid>
		<description>Hi Gunnar&lt;br/&gt;&lt;br/&gt;This example just does the mailing part. It's not too hard to call it from other code that does the work assembling the file list.&lt;br/&gt;&lt;br/&gt;In the case where I'm using this, the code to manipulate the files would look something like&lt;br/&gt;&lt;br/&gt;#start here&lt;br/&gt;files_to_email = Dir['/home/juliand/to_email/*.jpg']&lt;br/&gt;to = 'some.address@example.com'&lt;br/&gt;from = 'julian@example.com'&lt;br/&gt;mime_type = 'image/jpeg'&lt;br/&gt;files_to_email.each do &#124;f&#124; &lt;br/&gt; FileMailer.deliver_file(to, from, f, mime_type)&lt;br/&gt;end&lt;br/&gt;#end here&lt;br/&gt;&lt;br/&gt;(I think the format will get messed up by the comments system, but you get the idea)&lt;br/&gt;&lt;br/&gt;To get it to pick up all files in a directory whenever they arrive, you'd probably want to set up a cron job, or start a permanent ruby  process running in the background. You'd need to write some extra code to periodically check for any files, email then, then move them to an archive directory (so they aren't picked up the next time).&lt;br/&gt;&lt;br/&gt;Hope this helps.</description>
		<content:encoded><![CDATA[<p>Hi Gunnar</p>
<p>This example just does the mailing part. It&#8217;s not too hard to call it from other code that does the work assembling the file list.</p>
<p>In the case where I&#8217;m using this, the code to manipulate the files would look something like</p>
<p>#start here<br />files_to_email = Dir['/home/juliand/to_email/*.jpg']<br />to = &#8217;some.address@example.com&#8217;<br />from = &#8216;julian@example.com&#8217;<br />mime_type = &#8216;image/jpeg&#8217;<br />files_to_email.each do |f| <br /> FileMailer.deliver_file(to, from, f, mime_type)<br />end<br />#end here</p>
<p>(I think the format will get messed up by the comments system, but you get the idea)</p>
<p>To get it to pick up all files in a directory whenever they arrive, you&#8217;d probably want to set up a cron job, or start a permanent ruby  process running in the background. You&#8217;d need to write some extra code to periodically check for any files, email then, then move them to an archive directory (so they aren&#8217;t picked up the next time).</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-74</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 01 Aug 2007 12:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawblock.com/2007/07/31/how-to-send-smtp-mail-in-ruby-using-actionmailer-outside-rails/#comment-74</guid>
		<description>Hi Julian,&lt;br/&gt;Just found your post with google. I am new into programming, and new to ruby as well.&lt;br/&gt;&lt;br/&gt;I am trying to use your example as a standalone tool to send all .jpg files from a directory. I have not succeeded yet, still installing some gems.&lt;br/&gt;&lt;br/&gt;Any more ideas how to make this automatic, when a new.jpg file shows up in a directory, sent it via e-mail directly. &lt;br/&gt;&lt;br/&gt;Need to get the "smtp relay" with auth to work as well via my ISPs servers.&lt;br/&gt;&lt;br/&gt;This will be used for my the surveillance cameras in my summer house...&lt;br/&gt;&lt;br/&gt;Regards&lt;br/&gt;Gunnar&lt;br/&gt;Stockholm</description>
		<content:encoded><![CDATA[<p>Hi Julian,<br />Just found your post with google. I am new into programming, and new to ruby as well.</p>
<p>I am trying to use your example as a standalone tool to send all .jpg files from a directory. I have not succeeded yet, still installing some gems.</p>
<p>Any more ideas how to make this automatic, when a new.jpg file shows up in a directory, sent it via e-mail directly. </p>
<p>Need to get the &#8220;smtp relay&#8221; with auth to work as well via my ISPs servers.</p>
<p>This will be used for my the surveillance cameras in my summer house&#8230;</p>
<p>Regards<br />Gunnar<br />Stockholm</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.283 seconds -->
