On Monday, July 29, 2013 9:44:56 AM UTC-5, Edu M. wrote:
Hi people, im trying to send e-mails using rails 2.3.10 and ruby 1.8.7
I have googled a lot but the best result i got was a code that not sent
the e-mail and not dropped any error. Some one knows or has an example of a
working e-malier for this version of rails and ruby?
Thanks in advance.
The way ActionMailer worked in 2.3 is quite different from the way it
now in 3.2 and 4.*. There are some older apps that you can look at
that had modles that used ActionMailer built in. ActionMailer did not
change much between 2.1 and 2.3. The links that I will be providing in
example is from an app that is 2.1 but, when upgraded, will run under
with no changes to the model code for ActionMailer. The application is
coded for ruby 1.8.7.
First you would want to setup your Model like by inheriting from
ActionMailer. Then specify as methods each of the mail actions you
You’ll also need to make sure you ActionMailer preferences are setup.
app did it by specifying them in an initializer because it pulled
information from a database as to what should be specified for smtp.
Let us know how it goes. If you have any questions I will do my best to
help answer them. Rails 2.3 was awhile ago so I’m a little rusty.