•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Ruby section within the Web Development category of DaniWeb, a massive community of 402,576 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,256 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Ruby advertiser: SELL YOUR PRODUCT TODAY !
Views: 3201 | Replies: 2 | Solved
![]() |
•
•
Join Date: Oct 2005
Location: Manchester, UK
Posts: 481
Reputation:
Rep Power: 3
Solved Threads: 31
quick example using action_mailer.
If you don't have it already gem install 'action_mailer'
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 9:46 am.
Note to self... pocket cup
•
•
Join Date: Apr 2007
Location: Pune, India
Posts: 9
Reputation:
Rep Power: 0
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
![]() |
•
•
•
•
•
•
•
•
DaniWeb Ruby Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- 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)
- Using Shell Script how to send mail automatically (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


Linear Mode