Questions tagged [actionmailer]

Action Mailer is a framework for designing email service layers. Original ActionMailer is written in Ruby, but there is also implementation for ASP.NET MVC.

Action Mailer is a framework for designing email service layers. These layers are used to consolidate code for sending out forgotten passwords, welcome wishes on signup, invoices for billing, and any other use case that requires a written notification to either a person or another system.

Action Mailer is in essence a wrapper around Action Controller and the Mail gem. It provides a way to make emails using templates in the same way that Action Controller renders views using templates.

Additionally, an Action Mailer class can be used to process incoming email, such as allowing a blog to accept new posts from an email (which could even have been sent from a phone).

2387 questions
0
votes
1 answer

How to prevent Rails from rendering links when using partials in Mailer

I would like to reuse my partials in mailer layouts, but I want to avoid rendering the hyperlinks and instead print out just their name, like using link_to_if / link_to_unless methods. Which condition could I check to prevent the rendering all the…
Claudio Floreani
  • 2,441
  • 28
  • 34
0
votes
0 answers

Seems like I can't bcc an email address with Roadie Rails gem

I am using Roadie Rails gem, and for some reason when I add bcc field as an argument to the mail method, it does not send the email to the bcc'ed user and the bcc'ed user ends up showing in the to field of the final sent email. Any ideas…
Elvin Jafali
  • 113
  • 2
  • 13
0
votes
0 answers

OUTLOOK SMTP - Mail not sending on production using rails

I have the below configuration on my development.rb and production.rb. config.action_mailer.default_url_options = { host: ENV["HOST_NAME"] } config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true …
0
votes
1 answer

Instance variables not appearing in Rails ActionMailer and rspec preview

I have a rails 7 app. Here are the relevant pieces of code: /app/mailers/team_mailer.rb def final_survey_nag_email @leader_name = params[:leader_name] @leader_email = params[:email] @team_name = params[:team] mail(to: @leader_email, subject:…
Mark Locklear
  • 5,044
  • 1
  • 51
  • 81
0
votes
1 answer

How to pass dynamic scope params to Ruby on Rails Mailers?

In my Rails 7 app I have the following routes set up: Rails.application.routes.draw do scope 'account/:current_account' do resources :clients end end This will, for example, generate a route like…
Tintin81
  • 9,821
  • 20
  • 85
  • 178
0
votes
1 answer

Change I change the order of Rails Preview Mailers?

I know this is probably an odd request, but I have an app that I am building (Rails 7) and it's very email heavy. When I visit the default mailer preview; in my case /rails/mailers/team, I'd like to have the mailers listed in a particular order. In…
Mark Locklear
  • 5,044
  • 1
  • 51
  • 81
0
votes
0 answers

How can I truncate the HtmlBody when sending emails through postmark

I'm using postmark to send emails in my rails application where the email content is auto generated. The thing is that in some cases I getting this error from postmark. Postmark::InvalidEmailAddressError Invalid 'HtmlBody' value. It should be less…
Hernan Acosta
  • 377
  • 5
  • 19
0
votes
1 answer

Multipart email with ical attachment displays incorrectly

I'm not sure if this is an issue with my code, ActionMailer, Mail, or maybe even the icalendar gem? A user registers for an event and they get an email with an ical attachment: # app/mailers/registration_mailer.rb class RegistrationMailer <…
Chiperific
  • 4,428
  • 3
  • 21
  • 41
0
votes
1 answer

How can I use ActionMailer previews in a Sinatra app?

I have a Sinatra Ruby app with the ActionMailer gem for sending emails. The email sending functionality works fine, but I can't figure out how to use the preview functionality for development. My mailer mailer.rb is located in…
NJRBailey
  • 69
  • 2
  • 4
0
votes
0 answers

switch to new server broke rails 2.2.2 app email

Moving to a new server broke all of my mailers in a rails 2.2.2 app. To debug this i created the simplest test email possible and continue to get an error. controller: def send_new_password @login = params[:login] @user =…
Jay
  • 6,206
  • 11
  • 48
  • 82
0
votes
1 answer

Rails ActionMailer Quoted Printable Encoding breaks the output

I have this html message that I would like to send using MIME format through a rest api call ( using microsoft send email api ). @message = "
Imam
  • 997
  • 7
  • 13
0
votes
1 answer

Do mail interceptors get called when config.action_mailer.delivery_method = :test

That's really the whole question. I have some mail interceptors but when I set the delivery mode to test, they don't do their thing - is this to be expected? config.action_mailer.delivery_method = :test
Peter Nixey
  • 16,187
  • 14
  • 79
  • 133
0
votes
1 answer

Rails mailer + sendmail from a models

I have a model that has some attached files. In the show action, I have a link to open a dialog that shows a form. This form is for sending email with the attached files from the parent models, as well as some information about the model. I created…
neimad
  • 219
  • 1
  • 5
  • 20
0
votes
1 answer

Sidekiq is queueing mails in the 'default' queue instead of 'mailers' queue

While upgrading my Rails 6.0 application to Rails 7.0.3, I'm facing the following problem : Sidekiq is enqueueing all my mailer jobs through the default queue instead of the mailers queue like it used to before. Code related to the same : in…
0
votes
1 answer

how to send email to user after purchase on STRIPE with ruby ​on rails

I would like to know how to send an email to the user after successful checkout My Webhook controller: class WebhooksController < ApplicationController skip_before_action :verify_authenticity_token def create payload = request.body.read …
1 2 3
99
100