actionmailer

Actionmailer not delivering mail, with rails 3

I am trying to make an application, that sends an email when user registers. i put in the smtp settings for gmail in the config/application.rb file and the mail function looks like mail(:to => "[email protected]", :subject => "Mail!", :from => "[email protected]", :content_type => "text/html") now when i see the logs, i see that it says mail ha...

The email body is missing when I send mails with attachements using ActionMailer

The content in the view is not being displayed. Only the attachment is being sent. Help would be appreciated! def send @subject = "Status of PIS App" @recipients = "[email protected]" @from = APP_CONFIG[:email] @sent_on = Time.now #@content_type = "text/html" content_type = "multipart/alternative" attachment :filename => "Report.ht...

how to raise/rescue from ActionMailer deliver method

I am sending emails with the following method: class Communicate < ActionMailer::Base def message(sub,msg,people) subject sub bcc people from '[email protected]' sent_on Time.now body :greeting => msg end end bcc contains 4 or 5 email addresses. During my testing I've noticed two ...

Problem with sendmail while using ActionMailer

My ActionMailer scripts look perfectly fine. However when I try to send from the console I get the error.I'm on Ubuntu 10.04. Any ideas would be helpful. command not found: /usr/sbin/sendmail -i -t ...

Weird CSS problem :Missing Inline CSS : ActionMailer Attachment

My ActionMailer involves generating a report and,storing it into a HTML file and sending it as a HTML attachment. I wanted to give it some styling , so I added inline styling that gets written into the HTML file everytime the report is generated . But the styling does not reflect in the attachment. Interestingly, the generated report wh...

rails increment on no error

I have a rails code that sends emails. Following is in my controller: def create @users = Users.find(:all) @sub = params[:sub] @body = params[:body] @index = 0 @users.each {|i| index++; Notifier.deliver_notification(@users.email_address, @sub, @body, @users.unsubscribe_link);} flash[:notice] = "Mail was sent to ...

ArgumentError with ActionMailer

Hi I have a login that after saving the new user is supposed to send an email. This works fine locally but on the production server I keep getting this error in my log files: ArgumentError (wrong number of arguments (8 for 6)): app/models/user_observer.rb:3:in after_save' /usr/lib64/ruby/1.8/observer.rb:185:innotify_observers' /u...

Rails 2.3 Action Mailer issue

Hi, I am using Action Mailer to send out emails when a transaction is reported. Even if a single user in the 'CC List' is not active on the exchange server, the email is not being sent to anyone in the list. I would expect it to send to everyone else and send a delivery failure notificationfor the user who is not active. Is this an addi...

Using ActionMailer in a Rails Plugin

I'm trying to create my first Rails plugin and am having some troubles leveraging ActionMailer in it. The plugin just collects user feedback and emails it off a given address so in terms of functionality it's not too complicated... All the functionality was working perfectly in my original application until I decided to pluginise this s...

Bind action mailer smtp setting from model.

Right now i have set my all smtp setting in environment.rb file. I have stored my all setting in database. I want to bind smtp setting from my model. How may i dynamically bind those settings from model ? ...

How can I send emails in Rails 3 using the recipient's locale?

How can I send mails in a mailer using the recipient's locale. I have the preferred locale for each user in the database. Notice this is different from the current locale (I18n.locale), as long as the current user doesn't have to be the recipient. So the difficult thing is to use the mailer in a different locale without changing I18n.loc...

Paperclip + Rails 3 + ActionMailer (receive) + s3

I am trying to save an image attachment sent to my rails app to s3 using paperclip however I am hitting these problems: Its getting to the attachment loop and failing with a NoMethodError (undefined method `size' for #<Mail::Part: 0x2b62856e8030>): app/mailers/user_mailer.rb:23:in `receive' app/mailers/user_mailer.rb:14:in `eac...

actionmailer and exchange

I am trying to set up my client's mail in my app but getting nowhere... I can access the email on oulook web access via: https://remote.networkrunners.com username: ghi\<username> password: pwd My development.rb looks like this: config.action_mailer.raise_delivery_errors = true config.action_mailer.perform_deliveries = true config.a...

rails mailer with different layouts

I use one layout for all my emails in my Notifier model (20+ emails)... however sometimes I just want to send a plain text email with no layout or html at all. I can't seem to be able to figure out how? If I try to send a plain text email i still get the layout, and all the HTML in the email. I'm using Rails 2.3.8. I read about this ...

Where do I put helper methods for ActionMailer views?

I have a method that takes an array of strings and joins them so they do something like this: >> my_arr => ["A", "B", "C"] >> and_join(my_arr) => "A, B, and C" Which I'd like my mailer to have access to so I can output some information into an email. I can't seem to find a good place to put it and putting it in the application_helper....

ActionMailer outside Rails 3. Anyone found a good tutorial?

Curious if anyone has seen any good references for using the new ActionMailer outside the rails framework. Thanks. ...

Forge To: email header with ActionMailer.

I'd like to send an email from my rails3 application to a set of users but have a dummy To address. For example: To: Some Entity From: Some Entity Bcc: [email protected], [email protected], [email protected] However, since ActionMailer leaves it up to the MTA to parse out the email addresses to send to (as opposed to passing an explicit re...

How to get a before filter in Mailer?

Hi, Am using action mailer in ruby on rails. I just want to filter the recipient emails according to email_bounce flag in users table. Is it possible to use any filter in mailer ...

Ruby on Rails 2.3.8 actionmailer error when using gmail smtp

I'm using Rails 2.3.8 and ruby 1.9 and have actionMailer set up as follows ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :enable_starttls_auto => true, :address => "smtp.gmail.com", :port => 587, :domain => "domain.com", :authentication => :plain, :user_name => "[email protected]", :password ...

Syntax question for delayed_jobs and email

I am getting a beautiful error : failed with NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] - 3 failed attempts My Controller: CardSignup.all.each do |user| Delayed::Job.enqueue MassEmail.new(user, params[:subject]...