actionmailer

Trying to set the message-id, in-reply-to, etc... in ActionMailer

I'm working on an app that needs to be able to send out email updates and then route the reply back to the original item. All emails will come to a single address (this can't change unfortunately), and I need to be able to determine where they go. My initial thought was setting the message-id for the item so that it comes back as a Ref...

Net::SMTPFatalError in rails 2.3.4

I'm getting the following error when trying to send email on rails 2.3.4(it worked on 2.3.2) using action_mailer_tls plugin: Net::SMTPFatalError in UsersController#create 555 5.5.2 Syntax error. w3sm66205164ybi.9 C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/net/smtp.rb:930:in `check_response' C:/Program Files (x...

Setting up sendgrid for rails..returning Authorization error

The emails now send from my local, but do not send from my box. I am returned this error. Anyone know what this might be? Net::SMTPAuthenticationError (535 5.7.8 Error: authentication failed: authentication failure ): My environments/production.rb ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :addr...

ActionMailer execution timeout

When trying to send an email to the user for reseting their password, I keep getting an execution timed out error. Other mailer functions work, so I know that the config settings are correct. The header reads: "Timeout::Error in Password resetsController#create" Here is the password_resets_controller: def create @user = User.find_b...

Sending a signup confirmation email with having to confirm using Devise

Hi all, I'm using devise to handle user authentication with my rails app. I'd like to allow my users to sign up and be instantly logged in and receive a confirmation email. Devise has the Confirmable module which sends out an email but requires the user to open up their mail application, find the email and click a link which then leads...

Ruby mailer is coming up with an EOFError

I am getting an EOFError (End Of File Error) on this code in my controller. The block where the error appears is at the end of the line that says UserMailer.deliver_message( I am unaware as to how to fix this, I have been stuck for about 2 months and this site was suggested. Please help. def contact @title= "Contact Us" ...

Active Mailer doesn't have the application helpers when used with delayed_job v.2

So if I try sending an email with action mailer directly, I can use all application helpers like url_for, content_for etc, but when I try to do the exact same action [sending email] with delayed_job [send_later] I getting a delayed job fail, of undefined function content_for etc, so it is like no helpers are loaded in my ActionMailer. I ...

Associations in ActionMailer Template

I have an ActionMailer Model (Notifier) and a view for the mail. In my controller i build an Array (access_data) that looks like this: access_data = [] users.each do |user| access_data << {'subscriptions' => user.subscriptions, 'login' => user.login} end When i create a "normal" view, i can do this: <% access_data['subscriptions']....

Is there something like filters in ActionMailer?

I want to run this same code for several mailers in an ActionMailer class. How can I achieve it? ...

Rails ActionMailer view text indentation problem

When i indent code in a mailer-view, i see the indentation in the sent (plain text-)mail, too. Is there a way to avoid this without writing my code without indentation…? ...

ActionMailer Doubt in Rails

My Application has a lot of modules like profiles, places, comments etc. So Inorder to send a mail when something interesting happens like a new comment, a new place, do I need to create many mailer classes(ProfileMailer, PlaceMailer, CommentMailer) and also corresponding observer classes to implement mail? ...

ActionMailer, HTML emails and DOCTYPE

I noticed that the examples in the Rails 3 Action Mailer Basics guide use HTML5 doctype tag <!DOCTYPE html> for HTML emails. Older Rails 2 guide examples use Transitional doctype. As far as I know, HTML emails must use the most basic, old-style HTML code with some deprecated tags, so various email clients display it properly. This sugges...

Rails: Email a pdf generated with prawn to an email sent by ActionMailer?

I have an ecommerce app. I'm using Prawn to generate pdf invoices of orders. I'm using a standard Prawn setup. In views/admin/orders, I have a file called show.pdf.prawn. When the seller is viewing an order in his admin section, he clicks a link that opens the pdf version of the orders/show view. This all works perfectly. Now, the ...

Reusing form_for in view for a mailer errors on forgery

I have a form_for in a template new.html.erb where I do the normal save to the DB and then an e-mail on success. I want the mailer to send the same new.html.erb as the body and pass the model so that the form is fully populated. I'm getting the following error: undefined method `protect_against_forgery?' for #<#<Class:0x000000049d7110>:...

How to handle ActionMailer errors ?

Hi, In production, ActionMailer shows following errors, that are displayed in a log: Errno::ECONNREFUSED (Connection refused - connect(2)): /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/smtp.rb:551:in `initialize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/smtp.rb:551:i...

Net::SMTPAuthenticationError 502 5.5.2 in Rails ActionMailer

Hi, i'm trying to send confirmation email to the user. But i get following error: Net::SMTPAuthenticationError (502 5.5.2 Error: command not recognized Configuration in production.rb is following: # Disable delivery errors, bad email addresses will be ignored config.action_mailer.raise_delivery_errors = true # set delivery metho...

Make image in HTML based mail no resizable

I have composed a simple mail message with ActionMailer <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome mail</title> <style type="text/css" media="screen"> img { display: block; position:...

actionmailer with gmail in production

I am sending mails using actionmailer and using gmail with the following configuration In Notifier.rb ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, # :domain => I18n.translate('notifier.domain'), :domain => 'gmail.com', :user_name => '[email protected]' :...

problem with Actionmailer "Timeout::Error" ?

Hi im trying to send a email with action mailer and it gives me a Timeout::Error (execution expired): even though in the console it says that the e mail is sent: it shows Sent mail to [email protected] then displayes the e mail that was sent then it shows the following error: Timeout::Error (execution expired): /usr/lib/ru...

handle bounced email - ActionMailer

Hi, I have a rails app and I am using ActionMailer to send email but now I need to know if the email is delivered or what? Do anyone has an idea of how to handle sent emails status(e.g bounced, delivered) ? thanks. ...