actionmailer

Should ActionMailer raise_delivery_errors be true or false in production?

If true it will send an error message to the user. If false delivery errors wont be noticed. What's the recommended way to handle this? ...

Pass data to mailer daemon in Rails?

According to the Rails API (snippet below), the optimal way to receive mail is by creating a single Rails instance within a daemon that gets invoked by a MTA whenever new mail arrives. My question is: how do you pass data to that daemon when new mail arrives? ======================== Rails API Snippet To receive emails, you need to i...

How to write static file from ActionMailer::receive() w/o duplicating code in Rails?

I'm facing the following challenge for a Rails project: When a user receives mail, I want to invoke a method that writes the message out to a static file. The trick is, the mail needs to be embedded in a styled HTML page (i.e., we will surround the actual message with other page elements and style the whole page). Here's the current a...

How do I attach an inline image to the email being sent by ActionMailer?

How do I attach an inline image to the email being sent by ActionMailer? How do I test if image was really attached at a specific place in the Email? ...

Actionmailer passing more than one argument.

Hi I am trying to figure out what I am doing wrong with ActionMailer. I need to be able to pass more than one argument to a mailer but continue to receive the error "wrong number of arguments (1 for 2)". My code is: soldier_controller def create @soldier = Soldier.new(params[:soldier]) @battalion = Battalion.find(params[:battalion_...

Retrieving and parsing a MIME email from a database

Task given: An email is stored, byte for byte, in one or more chunks (of fixed length) in a database. This mail is to be retrieved from that database and it's contents shall be displayed to the user. I have no problem wrapping the legacy database in an ActiveRecord model, concatenating the stored chunks and so on. What I don't really kn...

How Efficient is ActionMailer?

I am building a tool for users to send invites for a site. Is ActionMailer the best way to send the mail? It seems to be very very slow. Anyone have other recommendations? (Ubuntu Intrepid Server) Thanks. ...

Rails Actionmailer Sending Email to Multiple Recipients that are Chosen from the View

Hi I am having trouble figuring out how to send email to a few different set groups with multiple recipients. I have many users, each user has an 'Inbox' found with their login name so something like: /users/c230in_cc/messages. The user can then go to "New Message" to send a message. Emailing one person is not a problem, I have that wor...

How do you access the session from within an ActionMailer class?

I have is an application can be accessed from 2 different URLs and looks/behaves slightly different depending on which URL you use to access it. I'm able to do this by storing a value in the session object and basing some decisions off of it such as which path views get loaded from. This sort of approach seemed like it would work until ...

Rails: Internationalisation of Active Mailer

Hi there, I need to develop a Rails application that supports sending e-mails in more than one language. ActionMailer only supports a single template per e-mail 'view', and I don't want to make my own implementation that breaks with Active Mailer compatibility (departing from the notion that I would like to benefit from future vendor p...

Can I specify a different recipient for an ActionMailer email based on the environment?

I'm wondering if it's possible to configure a Rails email derived from ActionMailer to send to a different recipient based on the environment. For example, for development I'd like it to send mail to my personal email so I don't clog up our company email account with "Testing" emails; for production however I want it to use the real add...

Rails ActionMailer with multiple SMTP servers

I have a need to use two different smtp servers in a Rails application. It appears that the way ActionMailer is constructed, it is not possible to have different smtp_settings for a subclass. I could reload the smtp settings for each mailer class whenever a message is being sent, but that messes up the ExceptionNotifier plugin which is ...

Which Rails content management systems (CMS) work with ActionMailer?

I want to use my Rails app to send campaign-style emails ("Hi, call your representative! Her name and number are...") that are customized on a per-user basis. Effectively, each user could be seeing a slightly different email. Some of these emails would need to contain link_to's, and other helper functions. I've never used any CMS in Rai...

TMail Object Missing BCC Information

I am running a cron job that checks for new email on a Gmail account every minute. If any new mail is found, it triggers a receive function that begins as follows: def receive(email) # REPORT SOME INFORMATION ABOUT INBOUND EMAIL RECEIPT puts "SUBJECT: #{email.subject}" puts "#{email.class}" puts email.to.inspect...

ActionMailer long line is broken.

Hi, I am sending an email from a rails app with HTML format. It's utf8 format and I write Korean. Some characters are broken when I get it with gmail or yahoo mail. I checked the log and it sent ok. But when I checked original text from gmail, a long line was forced to break line. Correct text: 연합회 홈페이지는 Broken text: ...연합회 � �페이지...

What is the best way to show my users a preview of email templates in Ruby on Rails?

My software sends emails for users. I want to show them what the emails will look like before they get sent. However, with ActionMailer conventions, the entire template is in one file. This means the html,head,body tags, etc. Can anyone think of a good way to give my users a preview of what the emails I send out will look like? Than...

rails action mailer problem...

My application mailer works fine in development on my own machine but on the server it doesn't work the way I want. I know the server is perfectly capable of relaying the emails requested because I can get it to work directly from the command line and if I put: ActionMailer::Base.delivery_method = :sendmail directly in my environment...

Are there any ActionMailer security gotchas

I know that in PHP I need to validate/massage any input that goes into an email header (eg the recipients email address). Is there anything I need to be aware of with ruby on rails/ActionMailer as regards email security? ...

ActionMailer and Exchange

Hello Community, I successfully send Mails via SMTP using my Rails App and my Postfix Server. Now I need to move to an Exchange: Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 that has POP3 and SMTP support enabled. I use actionmailer 1.2.5 and am not able to successfully login to the server while trying to send a mail. In ca...

Receiving Email (ActionMailer) with Rails to process image attachments

I am trying to parse an email sent to my app server. It should read the email to find the user by email then add the photo to the user's photo models Here is what I have so far. What am I doing wrong? class Mailman < ActionMailer::Base def receive(email) logger.info("Got an email about: #{email.subject}") if (@user = Us...