2,385
questions
0
votes
1
answer
41
views
ArgumentError: wrong number of arguments using ActionMailer with Ruby 3.2.2 / Rails 6.1.7.8
Using Ruby 3.2.2 and Rails 6.1.7.8 I'm getting an ArgumentError attempting to send an email. This previously worked using Ruby 2.7.8 and Rails 6.1.7.7.
RSpec tests that were previously passing are ...
0
votes
0
answers
33
views
Sendgrid's Inbound Parse works with Rails 7 Action Mailbox locally, gives 401 error code in production
I've been working on an Ruby on Rails app that allows you to assign tasks to users, who then get an email. Users can then reply to that task assignment email to update on task progress, which should ...
0
votes
1
answer
13
views
How to test that all ActionMailer preview actions render/do not fail?
My app has a lot of mailer actions and previews and I would like to automatically test that all listed mailer preview links respond with HTTP=200/do not fail rendering.
This should solve the problem ...
0
votes
1
answer
50
views
Why does RSpec Rails generate mailer fixtures?
I executed this command:
rails g mailer users/confirmations confirm_email
It generated this file at spec/fixtures/users/confirmations/confirm_email:
Users::Confirmations#confirm_email
Hi, find me in ...
0
votes
1
answer
923
views
Google SMTP with App password suddenly stopped working March 19 2024
Nothing in code has changed. I am using Ruby on Rails Action Mailer sending via SMTP Google. I am using an App password, so according to my understanding of their documentations, the sunset of Less ...
0
votes
0
answers
192
views
Trouble sending emails using Action mailer in rails 7
I am having trouble sending emails via action mailer in rails 7 app. Now If I configure my action mailer using gmail, it works fine and sends emails as expected. The setting is following.
config....
0
votes
0
answers
31
views
Deliver_later not working for legacy site
I've got a legacy site I'm working on that is giving me a new error. It's Rails 5.1.0.rc2.
Site uses the below similar coding in other mailer actions, which are giving this error:
Error performing ...
0
votes
1
answer
32
views
Action Mailer - I don't manage to send an automatic email with Action Mailer, GMail and Rails
I work on Rails and Action Mailer. I created a form. When the visitors filled the form and sends it, it should trigger the sending of the form, record the form's data in my db, send an automatic email ...
0
votes
0
answers
68
views
Ruby on Rails 7 - Send inline image in email
I have a Ruby on Rails 7 app, running locally in development on my localhost:3000. I can send an email, but I would also like to include a logo image inside the email, inline, not downloadable ...
0
votes
1
answer
207
views
Rails ActionMailer with() params vs Parameters Directly on the Method
In Rails ActionMailer, you can send parameters to the mailer either by:
with() params:
Class MyMailer
def send_something
@user = User.find(params[:user_id])
..
end
end
MyMailer.with(...
0
votes
1
answer
17
views
Why is Link in Rails Mailer Email Showing Incorrectly?
'Rails 6.1', 'ruby 3.1.1'
This is the first time I've added a link in an html email sent via a rails mailer. The email works, it's sent (to me) and I can see it. But the hyperlink in it is showing ...
0
votes
1
answer
110
views
Why can't I send emails from Rails in production using a typical ActionMailer config?
I had a look at 535-5.7.8 Username and Password not accepted in Rails Mailer using Gmail and their problem is similar to mine, and I'm not sure they got it resolved.
I set up 2fa with an app password ...
0
votes
0
answers
17
views
How to have a Failover smtp provider for ActionMailer
I have been using a really fast and new smtp provider for my rails app SAAS but there was an outage and really do not want to move away but was wondering if there is any way to have a fail over smtp ...
0
votes
0
answers
53
views
Rails email action text attachment link_to not showing
After implementing @mentions to Article models has_rich_text, everything works fine but when I try to send these articles as an email, the mentions fail to render right. I see sgid and content, via ...
0
votes
2
answers
234
views
Rails 7 is trying to use .deliver instead of deliver_now
I have this class to send an mail, using rails 7
class Mailer < ApplicationMailer
def initialize(emails)
super()
@emails = emails
end
def send()
mail(
to: @emails,
...
1
vote
1
answer
23
views
How to include urls when evoking ActionMailer::Base.mail
I am sending an email with Rails like so:
ActionMailer::Base.mail(
from: "[email protected]",
to: "[email protected]",
subject: "test",
body: "test"
)....
0
votes
1
answer
63
views
Rails ActionView::MissingTemplate, Template Is Missing for mailer
I have a mailer class called ContactUsMailer that inherits from ActionMailer::Base.
class ContactUsMailer < ActionMailer::Base
default from: '[email protected]'
def contact_us(name:, email:, ...
0
votes
1
answer
143
views
"Inline Attachments" images are not shown in mail with Action Mailer
Regards!
I'm trying to put Attachments Inline images into an Gmail email, but for some reason, images are not shown in the email's body.
I have searched a lot on the Internet and all found answers say ...
0
votes
1
answer
37
views
Why won't Rails' with_locale method allow additional URL parameters?
I've got this Mailer in my Rails 7 project:
# app/mailers/quote_mailer.rb
class QuoteMailer < ApplicationMailer
def quote_mail(quote)
@quote = quote
@user = quote.user
@client = ...
1
vote
2
answers
47
views
Hi. i'm trying to build a newsletter using action mailer. Unfortunately i'm stuck when i'm trying to send emails to each users registered
the preview isn't working and keep getting different errors.
My schema.rb looks like this
ActiveRecord::Schema[7.0].define(version: 2022_12_31_110010) do
create_table "users", force: :...
0
votes
1
answer
66
views
Is there any way to confirm email delivery by smtp at Action Mailer?
Action mailer sends email through sendgrid with smtp settings, I can get delivery confirmation by sengrid's webhook, and some emails delivered to sengrid, some - looks like not, for example we sent ...
4
votes
1
answer
489
views
Ruby on Rails update triggered ArgumentError in Mailer functions
We have recently migrated our codebase from Ruby 2.7.x and Rails 5.2.x to Ruby 3.2.2 and Rails 6.1.7.3. Previously, our mailers were defined like this:
class ApplicationMailer < ActionMailer::Base
....
3
votes
0
answers
95
views
Ruby on Rails SMTP Settings 550 Sender verify failed
When sending my e-mail I get
550 Sender verify failed (Net::SMTPFatalError)
This is what my smtp_setting looks like:
config.action_mailer.delivery_method = :smtp
config.action_mailer....
2
votes
1
answer
87
views
Ruby on Rails ActionMailer SMTP Settings mTLS
How would you setup a mTLS connection for action mailer in ruby on rails?
0
votes
1
answer
252
views
Testing mailers with Rspec and factory_bot
Hey guys, i need help, am new to testing and am testing my mailer but i do not understand y am getting this error when i run my tests.
'expected ActionMailer::Base.deliveries.size to have changed by 1,...
0
votes
0
answers
149
views
SocketError (getaddrinfo: Name or service not known) while sending email using Proton Mail in rails
I'm getting error while the mail is getting deliver. When I changed the configuration in development.rb from proton mail to gmail for testing purpose then the email is getting sent. Meaning there's a ...
1
vote
1
answer
78
views
NoMethodError when "to" contains a name with unparsable characters
We get people's names from a third party source, some of the last names contain a department suffix such as "(R&D)". When trying to send email, via ActionMailer, we get a NoMethodError ...
1
vote
0
answers
42
views
How to charge Wicked PDF stylesheets into ActionMailer in Rails
I am using the wicked PDF gem and to load the styles for my page it works like a charm, it loads the styles and the content
The problem is when I want to attach a pdf in Mailer, the ...
0
votes
1
answer
291
views
Rails : how send an email at a specific date with Rails 7?
I have already read this thread (Send emails at specific times in Rails) which looks interesting but was written 8 years ago.
Here is my need :
I need to send an email at a specific date (a user ...
1
vote
1
answer
64
views
ActionMailer::Preview callbacks?
ActionMailer::Base provides call backs like ActionController::Base does which allows for common code to be called before a mailer function/action. It seems this is not supported for ActionMailer::...
0
votes
1
answer
223
views
ActionMailer SMTP working in production but not locally
Seems to be the opposite problem to a lot of the questions on here. I've not been able to get the mailers working locally but then I deployed my app to Heroku and everything is fine.
No apparent ...
0
votes
0
answers
125
views
Send email using html button javascript and Rails
Im new to using rails and i have a test where im given a code that send an email through a click and i have to compleate it,
Here is the code:
app/views/root/index.html.erb
<%= form_tag root_path, ...
0
votes
0
answers
175
views
how to end email using Rails and js and html button?
Im new to using rails , and i am trying to figure out a solution to sending an email using an html button, javascript function and rails.
HTML and JS code:
<%= form_tag root_path, class: "send-...
0
votes
1
answer
150
views
ActionView is missing template in Preview. How to resolve?
I am currently trying to have ActionMailer send an email with Letter_Opener gem. When I try to view the preview with localhost:3000/mailer/order_mailer the terminal logs this error:
app/mailers/...
1
vote
0
answers
172
views
ActionMailer and Rspec: Unable to find a browser command (Rails 5.2)
I have upgraded rails 4.2.11.1 to 5.2.8.1, and ActionMailer stopped working within Rspec.
When I run this simple welcome email (described on their page):
UserMailer.with(user: @user).welcome_email....
1
vote
2
answers
66
views
Rails Action Mailer Issue
Im trying to send HTML code as a variable using ActionMailer's ( Ruby on Rails default mailer ).
I have an example bellow with an easy variable ( thats also HTML code )
def newsletter // ==> my ...
2
votes
1
answer
232
views
ActionMailer with Rails: uninitialized constant UserMailer
Getting this error in console when I try UserMailer.welcome.deliver_now
(irb):6:in `<main>': uninitialized constant UserMailer (NameError)
UserMailer.welcome.deliver_now
^^^^^^^^^^
Did you mean?...
0
votes
1
answer
362
views
ActionMailer with Rails: Missing template user_mailer/welcome with "mailer"
I get this error in my console when I run UserMailer.welcome.deliver_now
irb(main):002:0> UserMailer.welcome.deliver_now
UserMailer#welcome: processed outbound mail in 0.7ms
/Users/jlandis/.rbenv/...
1
vote
0
answers
289
views
Rails ActionMailer 6.1 / Ruby 3.1.2 / docker : certificate verify failed (self signed certificate)
Could someone please help me to troubleshoot/configure sending email with ssl/tls please ?
Ruby : 3.1.2
Rails : 6.1.7
net-smtp: 0.3.3
docker image : 3.1-slim
My own organisation SMTP serveur that ...
0
votes
2
answers
2k
views
Rails deliver_later getting Unsupported Argument Type
I have changed mail delivery in my Rails application to implement deliver_later instead of deliver_now, and am running into an error message from ActiveJob.
The old mechanism was:
mail_collection.each ...
0
votes
2
answers
64
views
Rake test equivalent for ActionMailer::TestHelper?
We have recently migrated from sending emails with deliver_now to deliver_later. So that queued emails aren't lost when the system restarts, we implement this with Sidekiq.
When we used deliver_now, ...
0
votes
1
answer
34
views
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 ...
0
votes
0
answers
26
views
OUTLOOK SMTP - Mail not sending on production using rails [duplicate]
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 = ...
0
votes
1
answer
64
views
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 = ...
0
votes
1
answer
87
views
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 ...
0
votes
1
answer
112
views
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 ...
0
votes
0
answers
255
views
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::...
1
vote
2
answers
638
views
Sendgrid emails being sent without the template
My sendgrid emails are being sent ok, but the template is never loaded. I have tried multiple times with many templates but they are never called, so there must be something wrong with my call.
This ...
0
votes
1
answer
242
views
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/...
1
vote
1
answer
611
views
Actionmailer on Redmine outputs error "certificate verify failed (self signed certificate)" on email send
I updated a Bitnami Redmine package from version 4.2.1-0 to version 5.0.2-2.
I successfully migrated all data to the new server, but now the actionmailer doesn't work anymore.
When I try to send a ...