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.

actionmailer
Filter by
Sorted by
Tagged with
0 votes
0 answers
259 views

Attached pdf in rails app error

Im implementing and mvc rails app, i can attach a pdf to an email and send it. But when im traying to open the attached file from my gmail the browser shows: Failed to load PDF document Controller:...
Mauri Rios's user avatar
2 votes
0 answers
142 views

Memory leak when bulk mailing

I'm doing an email delivery in the background (more than 1k letters). The server is on Heroku. For background tasks, I use sucker_punch. Rails is 4.1.6, web-server is passenger. This is my code: def ...
Andy Simon's user avatar
-1 votes
1 answer
110 views

ActionMailer.net/ActionMailerNext - how to confirm if an eMail has even been sent?

Working with ActionMailerNext, which is a fork of the now-dead ActionMailer.net, and I cannot for the life of me figure out how to determine if the eMail has been sent, or if an error occurred that ...
René Kåbis's user avatar
0 votes
1 answer
848 views

mailgun rails - How to define mailgun_settings per ActionMailer

I am using mailgun-ruby to send emails in my rails app. I have activated a number of domains on my Mailgun account and for each ActionMailer I wish to choose a specific domain to send emails from. ...
Meysam Feghhi's user avatar
0 votes
1 answer
102 views

Rails content-type not staying set. SparkPost?

I am sending out an email with actionmailer through SparkPost. I have set the content-type the following ways: in action model: default content_type: 'text/html' and in the model action: headers['...
bryanfeller's user avatar
2 votes
1 answer
1k views

How to add a image or thumbnail to email sender on Rails Mailer?

I want to set a logo for the LCA Systems mail that I am sending from my application to be as the others bellow. Now it is showing just an Interrogation point. Is there any way to replace this ...
Luiz Henrique's user avatar
0 votes
0 answers
724 views

Connection refused - connect(2) for "localhost" port 1025

I am going through this tutorial (link:https://www.murdo.ch/blog/build-a-contact-form-with-ruby-on-rails-part-1) to create a simple contact us form on my existing rails application. After completing ...
Reynold Dmello's user avatar
3 votes
3 answers
4k views

`method_missing': undefined method `mail' for Emailer:Class (NoMethodError)

I am studying Peter Cooper's book Beginning Ruby. There is a simple example in it using ActionMailer to send an an email. The example code is below: require 'action_mailer' ActionMailer::Base....
Asarluhi's user avatar
  • 1,290
0 votes
1 answer
351 views

Rails email whitelist is not working

I am using https://github.com/brightin/mail_whitelist gem In my initializer I have the following code require 'mail_whitelist' if Rails.env.development? || Rails.env.dev? whitelist = ['@mydomain....
Petran's user avatar
  • 7,887
1 vote
1 answer
92 views

View taking too long to render when using relative path for image_tag

I have some views for email sending. When I use something like: <%= image_tag('http://example.com/assets/image.png') %> The email is taking this much to render: Rendering mailers/user_mailer/...
Utku's user avatar
  • 2,113
0 votes
1 answer
963 views

godaddy office 365 smtp settings in rails

I`m using this smtp configuration: config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: 'smtp.office365.com', port: 587, ...
tetiross's user avatar
  • 192
3 votes
0 answers
38 views

When passing a string without a space to "from" parameter in ActionMailer, from name just shows email and not string

I am running Action_Mailer on Rails and passing a string to the from parameter in ActionMailer. When I do it with a space such as: sender = 'Site user' #will show this label next to email mail(from:...
R. Byer's user avatar
  • 53
0 votes
1 answer
517 views

Configure ActionMailer with Devise to allow email to come from different user.

Question: How do I set up my mailer/devise to allow the "from" to be from the current_user.email versus just one email? Explanation: I have connected my rails mailer to use Microsoft exchange. ...
Mason SB's user avatar
  • 495
0 votes
0 answers
52 views

Action Mailer failing to execute method

Rails 4.2.1 Ruby 2.1.5 I am trying to use ActionMailer to send an email to a number of recipients, but I want the recipients to be all in the :Bcc field. In my conttollers/communications_controller....
EastsideDev's user avatar
  • 6,429
5 votes
4 answers
3k views

How to test emails that are set to deliver later

I can't figure out how to get the syntax to work for asserting that an email has been enqueued properly. Specifically, how do you pass in the arguments to the mailer when the argument is an object? ...
Tom Rossi's user avatar
  • 11.8k
0 votes
1 answer
455 views

Is it possible to send emails from the current user email?

I'm developing an internal operations manager for a company, They need to send automatic emails to their costumers, but the email has to be sent by the email address of the company operator that is ...
Sebastian Delgado's user avatar
1 vote
0 answers
196 views

Appropriate settings for rails actionmailer to send through cPanel smtp

I have looked here and here, but there is not a lot else to help me specifically configure actionmailer settings to work with cPanel hosting. Ultimately, all I want to do is have an email sent to ...
stevec's user avatar
  • 46.4k
1 vote
1 answer
232 views

Adding a class to check_box_tag in contact form (mailer)

I have a contact form with a checkbox asking for consent to send emails to the user - as in each field has a key feeding back to the site owner. I'm trying to add a class to the checkbox itself input-...
Boucherie's user avatar
  • 533
0 votes
1 answer
1k views

ActionMailer without template and multipart email

Rails will helpfully send multipart email if there are multiple template types present (e.g. .txt and .html files for the same mailer action). However, what if I want to do this without templates? ...
mahemoff's user avatar
  • 45.5k
0 votes
0 answers
245 views

ActionMailer deliver_later works in browser but not in test suite

I'm in the process of porting most of my mailers in my Rails 5 app to use deliver_later instead of deliver_now. One of my mailers works just fine when I test it in the browser, but not when I run it ...
Katie's user avatar
  • 478
0 votes
1 answer
303 views

Create link for Compose mail - Ruby on Rails

I need to create a link on a mail ID(say [email protected]) which would take you to Compose mail of the logged in e-mail such as outlook account and put [email protected] in To:____ Any suggestions on how it ...
Sakshi Kochhar's user avatar
5 votes
2 answers
719 views

Difference between register_interceptor and after_actions in rails

I am using rails 5 along with Amazon SES. I wanted to throttle emails before sending them because SES isn't able to handle bulk emails in a short span and mail jobs are failing. So I wanted to add a ...
sarthak0415's user avatar
0 votes
1 answer
125 views

Do providing plain text email form ensures us that recipient will get version he can properly show?

By default Rails mailers provides us with two email forms: the html one and the text one. In that post I found such a sentence: However, if you use html, you should provide an alternative text ...
Karol Selak's user avatar
  • 4,538
7 votes
1 answer
2k views

How to pass additional data to devise mailer?

I have a rails app that can handle many subdomains, and I have multiple live versions running with different domain names. This causes the URLs to be anywhere between mywebsite.com company1....
Cruz Nunez's user avatar
  • 3,019
0 votes
1 answer
26 views

How to handle mail partial attribute that isn't always passed in?

I have a mailer partial that supports a passed-in attribute if present, but doesn't require it. Unfortunately, if I don't include the attribute, an exception is raised because to call for that ...
Argus9's user avatar
  • 1,905
11 votes
2 answers
2k views

How do I remove mail html content from Rails' logs?

After an email has been delivered, the entire content of the email is visible in the logs in production, which is really messy. Can I remove the email content from the logs just in production?
Kristoph Matthews's user avatar
1 vote
1 answer
236 views

Change http_basic_authenticate_with credentials on fly, rails

I need that user can change ActionMailer settings on fly, without server restarting. I'm tryin do that on my mailer class class CustomerMailer < ApplicationMailer self.smtp_settings = { ...
O.Vykhor's user avatar
  • 461
1 vote
1 answer
42 views

Rails Controller Method performs functions before link is clicked

I have a small problem. I have created a activation link mailer that sends a users a activation link in their email before using the platform. The mailer does send the activation link and it ...
Merlin Jackson's user avatar
0 votes
0 answers
70 views

ActionMailer - Gmail Classifies Message As Spam mailgun

my configurgation setting is config.action_mailer.asset_host = "#{ENV['SITE_SCHEME'] || 'http'}://#{ENV['SITE_HOST'] || 'api.staging.engineer.ai'}" config.action_mailer.default_url_options = { host: (...
user3234275's user avatar
1 vote
1 answer
2k views

Devise not sending emails through ActionMailer

I have read through so many tutorials and answers online and am not finding my fix. I have setup my ActionMailer to send emails through Mailgun's service. I can verify that in production it does send ...
Christopher Warrington's user avatar
0 votes
1 answer
199 views

Using `delay` in Sidekiq with dynamic class/method names

Let's say I have some internal business logic that determines what mailer needs to be sent. The output of this business logic is a Hash in the following format - { mailer_class: SomeMailer, ...
user2490003's user avatar
  • 11.3k
-3 votes
1 answer
776 views

Ruby on Rails: uninitialized constant UserController::ReportUserMailer [closed]

I have following method is UserController def report_user current_user = User.find_by(id: params[:id]) unless current_user.nil? ReportUserMailer.report_user_email(user, params).deliver_now ...
Waqar Hassan's user avatar
0 votes
0 answers
329 views

Rails Mailer: Each do loop in Mailer View doesn't show up

I am implementing email (sendgrid in production, letter_opener in development) for my Rails 5 app but can't get my Mailer view to show the results of a loop. My mailer.html.erb code is: Hello &...
Jacinta Lim's user avatar
5 votes
1 answer
732 views

Mail gem not sending emails after upgrading to Rails 5.0.6

I upgraded my Rails app to 5.0.6 from 4.2.5. Now emails are not being sent by the Mail gem. I don't seem to be getting errors. I updated the Mail gem to the latest version with no luck. I am not sure ...
MrAutoIt's user avatar
  • 785
2 votes
2 answers
5k views

Render HTML string in email body with ActionMailer class in Ruby

I'm trying to send mail in ROR using ActionMailer class. I have created a mail object like : mail(to: '[email protected]', subject: "some subject text", body: template) Here template is a string which ...
Raman Preet Singh's user avatar
1 vote
1 answer
492 views

Rails - Is Sendmail or Postfix Installation required for External SMTP Server

So I use Sendgrid, an external SMTP server handling transaction emails. I just deployed my Rails app on a fresh new VPS, with Ubuntu on it. In Sendgrid tutorial, I saw that I only have to set ...
lulalala's user avatar
  • 17.8k
1 vote
2 answers
987 views

Why can't I test email sending in Rails 5?

I'm trying to test email sending in a simple Rails 5 app using cucumber and using the ActionMailer guide and Testing guide with the following simple case. Can you help me see why it's not working? ...
Micah Gideon Modell's user avatar
1 vote
0 answers
520 views

How to get message_id in the response object when using AWS SES

I want to get the actual MESSAGE-ID of the email sent to the user when I send the mail from my app. gems I am using gem 'aws-sdk` gem 'mail' config looks like this config.action_mailer....
sarthak0415's user avatar
1 vote
1 answer
4k views

ActionMailer ArgumentError - SMTP-AUTH requested but missing secret phrase

I am using Yandex Connect (SMTP) as a method to send emails from my Rails 5 JSON API app. Here's the setup: Rails.application.configure do config.action_mailer.delivery_method = :smtp config....
Almaron's user avatar
  • 4,147
2 votes
3 answers
920 views

how to retrieve message_id for a mail using deliver_later(sidekiq)

I want the SMTP message_id of a mail using deliver_later(sidekiq). I am able to get the id in the return obj of deliver_now but not deliver_later. Message_id is also missing in the return value of ...
sarthak0415's user avatar
1 vote
0 answers
34 views

Override ActionMailer from: using gmail

I am trying to override ActionMailer from: attribute in emails. To send mails I have created a sample gmail user account. My email settings: config.action_mailer.smtp_settings = { :address ...
abc def's user avatar
0 votes
0 answers
314 views

Upgrading to Rails 5 ActionView::Template::Error: no implicit conversion of Hash into String with image_tag

I'm upgrading from rails 4.2 to rails 5.1.1 and I have this strange breaking change in my email views. I've enabled ApplicationMailer and made my WelcomeMailer inherit from it, but I haven't changed ...
NothingToSeeHere's user avatar
1 vote
1 answer
389 views

SendGrid or Devise Conflict with Mail Gem

I just configured ActionMailer to use SendGrid so that I could use it with Devise emails. The email part is working perfectly, but now I can't complete a migration. The error I get is 'TypeError: Mail ...
lacoder's user avatar
  • 183
0 votes
1 answer
214 views

How to access classic smtp ports from a google compute engine instance

I am using google compute engine instances for a B2B customers, I am developing a feature that would allow customers to use their own smtp servers to send emails built via my application. However, the ...
Uelb's user avatar
  • 4,033
0 votes
2 answers
152 views

Rails mails "Sent" but never recieved

Hello I'm trying to send an email from my rails application and I've tried multiple solutions from questions similar to this one but it still doesn't work, here is my UserMailer: class UserMailer <...
IvanHid's user avatar
  • 699
2 votes
1 answer
1k views

Email attachment for document files using rails action mailer

I am using Rails action mailer. I need to send a email with document(doc, docx, txt) as attachment. When I am attaching .txt files, the content in that txt file are viewing properly. But when I am ...
Asha's user avatar
  • 21
3 votes
1 answer
7k views

Rails 5: ActionMailer's "deliver_later" never delivers in production

I have a very basic mailer setup as follows to send out transactional mailers: class PayoutMailer < ApplicationMailer default from: '[email protected]' def payout_success_email(email, ...
nao's user avatar
  • 1,148
1 vote
1 answer
907 views

Rails Mailer: "No route matches {}" when trying to use URL helpers

I can't get the *_url helpers to work in my mailers. For example, I have resources :pages in my routes.rb. But when trying to use any of the helpers in a mailer view, it's always telling me: ...
Joshua Muheim's user avatar
1 vote
5 answers
2k views

how to generate url for public folder in mailers?

In the mailer template i want to generate correct url for the path public/system/test.png Suppose in the mailer template <%= link_to k, "/system/test.png" %> <br /> how can i generate ...
kofhearts's user avatar
  • 3,672
1 vote
1 answer
479 views

Upgrading to Rails 5 and rspec 3.7 no longer sends emails via ActionMailer::Base.deliveries

I had a functional spec suite using rspec with a Rails 4.2.8. I upgraded to Rails 5.0.6 and rspec 3.7 accordingly. Many of the specs work, but none of my specs that send emails actually add the ...
Dan L's user avatar
  • 4,361

1
5 6
7
8 9
48