actionmailer

ActionMailer: Default From: address?

Googled for this to no avail. Didn't find anything in the API either. I was expecting some kind of class method or configuration option to set it... So, rather than calling from "[email protected]" for every method, it could be called automatically. ...

Setting ActionMailer template_root at runtime

Is it possible to set template_root for ActionMailer at runtime? I seem to be able to do this in development mode by using: ActionMailer::Base.template_root = my_view_path if File.exists (File.join(my_view_path,"test_mailer")) I'm checking to see if the mailer views directory exists in my special view_path, and using that view_path f...

How to use send an email with accents using actionmailer

My enviroment.rb is like this: ActionMailer::Base.default_charset = "iso-8859-1" wich should be enough for accents, but here is how the message's subject is been sent: Convite para participação de projeto Does anyone know what I have to do to fix it? Thanks ...

Rails ActionMailer Plugin for TLS encryption

Can anyone point me to a plugin/directions for enabling emails through a smtp server requiring encryption? I've done some searching and found http://agilewebdevelopment.com/plugins/actionmailer_tls , but the download is down, a pattern repeated with several other plugins also. ...

actionmailer formatted from

Hello everybody. I want to send emails with formatted sender such as "Support team [email protected]". If delivery method I wrote from "support team <[email protected]>" and from "\"support team\" <[email protected]>" but smtp server says #<Net::SMTPSyntaxError: 501 <support team <[email protected]>>: "@" or "." expected after "support" This means that rai...

My Active Record Observer is not called

i made one observer named inquiry for send notification email my model name is also inquiry but its not called i cant understand what is the problem i also made configuration in environment.rb file like this config.active_record.observers = :inquiry_observer ...

How to send emails with multiple, dynamic smtp using Actionmailer/Ruby on Rails

I saw this post but mine is slightly different: http://stackoverflow.com/questions/1559879/rails-actionmailer-with-multiple-smtp-servers I am allowing the users to send mail using their own SMTP credentials so it actually does come from them. But they will be sent from the Rails app, so that means for each user I need to send their em...

Encode mail as quoted-printable before sending in Rails

I saw this question and couldn't make use of it: http://stackoverflow.com/questions/1034135/ruby-email-encoding-and-quoted-printable-content I'd like to send out email as quoted-printable, but it's going out as unencoded text/html. Any help? class UserMailer < ActionMailer::Base def welcome_mail(user) recipients user.emai...

Rails Actionmailer Handling of Failed Messages

Hi, I'm using rails 2.2.2 on a linux box and am using a rake task to send some emails. It's a very simple script without error handling: 1.) Get emails to send 2.) Send email 3.) Mark emails as sent Right now, the port on the smtp server has been blocked temporarily so steps 1 and 3 are completing but not step 2. My question is, wh...

Problem with url_for and named routes in ActionMailer View: "Need controller and action"

I'm attempting to provide a confirmation link in my user welcome email and I'm getting the following Rails error: Need controller and action! It makes a fuss about this line: <p>Please take a moment to activate your account by going to: <%= link_to confirm_user_url(:id => @user.confirmation_code) %>.</p> In my development.rb envir...

How to trace Bouncing E-mails in Action mailer (Rails)

Hi, I am using Active mailer to sending Emails, I want to trace the mail ids which are bounced when i am sending the mails to the user. Please give your valuable comments guys. Thanks in Advance. *HIKKU ...

Action Mailer Confirmation Emails - Ruby on Rails...

I have successfully installed the Clearance Gem from ThoughtBot. Clearance sends a confirmation email upon a new sign_up and suggests adding: config.action_mailer.default_url_options = { :host => 'localhost:3000' } to your /environments/test.rb and development.rb. I have tried this and also config.action_mailer.default_url_options =...

How to save copy of outgoing email in IMAP "Sent" box using ActionMailer?

When I use my regular client and send email through SMTP for an IMAP account, that outbound email gets saved in the IMAP "Sent" box. How can I have the same behavior when I send email using Ruby on Rails ActionMailer? ...

How can I use from names in ActionMailer? [Rails 2.3.5]

I want to show a pretty name in the e-mail clients ...

Action Mailer: How do I render dynamic data in an email body that is stored in the database?

I have Action Mailer setup to render an email using the body attribute of my Email model (in the database). I want to be able to use erb in the body but I can't figure out how to get it to render in the sent email message. I'm able to get the body as a string with this code # models/user_mailer.rb def custom_email(user, email_id) em...

Testing ActionMailer's receive method (Rails)

There is good documentation out there on testing ActionMailer send methods which deliver mail. But I'm unable to figure out how to test a receive method that is used to parse incoming mail. I want to do something like this: require 'test_helper' class ReceiverTest < ActionMailer::TestCase test "parse incoming mail" do email = T...

Use of time_ago_in_words in ActionMailer template

How do I access time_ago_in_words from the email template in my rails app? ...

ActionMailer sent with body unavailable in view

So ive got a ActionMailer mailer class ReportMailer < ActionMailer::Base def notify_doctor_of_updated_document(document) recipients document.user.email_id from "(removed for privacy)" subject "Document #{document.document_number} has been updated and saved as #{document.status}" sent_on Time.now bod...

RoR: Using CRON and Actionmailer to send daily email updates to all users

What exactly would be the best way to go about using a cron task to send daily e-mails of updates to all users on my network? The e-mail would be made up of different information from multiple models. I want to do something like "1 new friend requests : name ..." from the request model and user model and "There are 3 upcoming events f...

Using Routing helpers in a Rake task

I have a rake task that sends out the next 'x' invitations to join a beta it uses this code: desc "This will send out the next batch of invites for the beta" task :send_invites => :environment do limit = ENV['limit'] c = 0 invitation = Invitation.all(:conditions => { :sent_at => nil, :sender_id => nil }, :limit => limit).each do |...