| | |
send mail
Please support our Ruby advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
quick example using action_mailer.
If you don't have it already gem install 'action_mailer'
If you don't have it already gem install 'action_mailer'
Ruby Syntax (Toggle Plain Text)
require 'action_mailer' ActionMailer::Base.server_settings = { :address => "your.smtp.server", :port => 25, :domain => 'yourdomain', :user_name => "your_user_name", :password => "shhhsecret", :authentication => :login } class Emailer < ActionMailer::Base def test_email(user_email) subject "Free C1Alis" from "system@example.com" recipients user_email.address body "Get large, #{user_email.name}!" end end @email_addresses = [ { :name => "Bobby Ewing", :address => "bobby@dallas.com" }, { :name => "Ewing, JR", :address => "jr@dallas.com" } ] @email_addresses.each do |e| Emailer.deliver_test_email(e) end
Last edited by pty; Mar 8th, 2007 at 10:46 am.
Note to self... pocket cup
•
•
Join Date: Apr 2007
Posts: 9
Reputation:
Solved Threads: 1
You can also do the same by checking this post of mine here -
http://sitekreator.com/satishtalim/smtp_class.html
http://sitekreator.com/satishtalim/smtp_class.html
![]() |
Similar Threads
- Using Shell Script how to send mail automatically (Shell Scripting)
- How to Send mail in asp.net 2.0 (ASP.NET)
- Unable to send mail in outlook 2003 (Windows Software)
- How to send mail from multiple accounts in outlook 2003 (Windows Software)
- C++ Builder 6 - Send Mail (C++)
- HElP script for send mail (Shell Scripting)
- Help "sell script to send a mail" (Shell Scripting)
- send mail via microsoft outlook (Windows Software)
- Cannot Send E-mail (OS X)
Other Threads in the Ruby Forum
- Previous Thread: ajax in selection box
- Next Thread: Count Object On Page
| Thread Tools | Search this Thread |





