[Backgroundrb-devel] Fwd: Need to send email from a worker
ezmobius at gmail.com
Thu Jun 29 23:51:02 EDT 2006
Begin forwarded message:
> From: Ezra Zygmuntowicz <ez at brainspl.at>
> Date: June 29, 2006 8:18:10 PM PDT
> To: Douglass Turner <douglass.turner at gmail.com>
> Subject: Re: [Backgroundrb-devel] Need to send email from a worker
> On Jun 29, 2006, at 7:45 PM, Douglass Turner wrote:
>> Can someone suggest the simplest way to send email from a worker?
>> At completion, I need to send the results of it's work to a
>> Doug Turner
>> skype: dduuggllaa
>> Backgroundrb-devel mailing list
>> Backgroundrb-devel at rubyforge.org
> The simplest way to do that is probably to use net/smtp. Or you
> could use your actionmailer class in the worker but that requires
> you to load pretty much all of rails in your drb server which is
> not very resource friendly. If its just a simple text email then I
> would just use net/smtp like so:
> msgstr = <<END_OF_MESSAGE
> From: Your Name <your at mail.address>
> To: Destination Address <someone at example.com>
> Subject: test message
> Date: Sat, 23 Jun 2001 16:26:43 +0900
> Message-Id: <unique.message.id.string at example.com>
> This is a test message.
> require 'net/smtp'
> Net::SMTP.start('your.smtp.server', 25) do |smtp|
> smtp.send_message msgstr,
> 'your at mail.address',
> 'his_addess at example.com'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Backgroundrb-devel