Questions tagged [mailer]

661 questions
40
votes
4 answers

How do I configure devise to use a custom email layout?

When I say layout I don't mean just simply the views, I generate those. On all my own mailers I'm using a default layout. Which I define in the SomeMailer.rb file #some_mailer.rb class SomeMailer < ActionMailer::Base layout 'sometemplate' Is…
holden
  • 13,471
  • 22
  • 98
  • 160
31
votes
7 answers

How to change "Devise: password reset instruction email's subject"

I'm just unable to change "password reset instruction" email's subject. I have changed notifer.rb in Mailer to overwrite Devise default email subject. But it's not working. Here in my application there is default Email subject inside Devise .yml…
rony36
  • 3,277
  • 1
  • 30
  • 42
16
votes
1 answer

Make a custom helper available to both Mailer and View in Rails 3.1

is this the best way to make a helper available to both Mailer and view in Rails 3.1? class EventMailer < ActionMailer::Base include MailerHelper helper :mailer I tried helper :mailer on its own, but that didn't allow me to use the helpers in…
pingu
  • 8,719
  • 12
  • 50
  • 84
15
votes
3 answers

How to use Google Docs for Mailer templates?

Is it possible to use Google Docs for Mailer templates? How can I change template variables via API? Basically, I want to keep a template on Google and export it as a PDF file after changing few variables like name, address etc. Is it possible to do…
understack
  • 11,212
  • 24
  • 77
  • 100
14
votes
0 answers

What is the difference between sidekiq perform and perform_async?

When running UserMailer.new.perform, my mailer is sent and I get an email almost right away, but when I use UserMailer.perform_async, it spits back an object number and I never receive an email. Can someone please tell me why this is happening and…
sclem72
  • 466
  • 6
  • 16
13
votes
5 answers

php mailer and html includes with php variables

Hello I am trying to send html emails using php mailer class. The problem is i would like to incllude php variables in my email while using includes as to keep things organized. Heres my php mailer.... $place = $data['place']; $start_time =…
tytyguy
  • 340
  • 1
  • 4
  • 15
12
votes
2 answers

How do I handle special chars in the credentials of the Symfony Mailer component in SMTP transport?

Context In Symfony 4.3 a new emailer was introduced. See here: https://symfony.com/blog/new-in-symfony-4-3-mailer-component https://symfony.com/doc/4.4/mailer.html. For the SMTP transport it is established that the DSN in the ENV var has this…
Xavi Montero
  • 9,239
  • 7
  • 57
  • 79
10
votes
1 answer

What are the routes I need to set up to preview emails using Rails 4.1 ActionMailer::Preview?

class UserPreview < ActionMailer::Preview # Accessible from http://localhost:3000/rails/mailers/notifier/welcome_email def welcome_email UserMailer.welcome_email(User.first) end end I have this simple mailer preview using Ruby on Rails…
sergserg
  • 21,716
  • 41
  • 129
  • 182
9
votes
1 answer

asset_url in mailer on rails 3.1

I have my mailer on rails 3.1 which has an inline attachment. To open that attachment i use this code: attachments["rails.png"] = File.read("#{Rails.root}/app/assets/images/Rails.png") is there a way to change that with something like assets_url ?
Nicos Karalis
  • 3,724
  • 4
  • 33
  • 62
9
votes
1 answer

Rails3 mailer with image_tag ignoring host

I've got a Rails3 mailer layout that include images. This ones are used like : image_tag("emails/top.gif", :width => "700", :height => "10", :alt => "") As of Rails 2, this images included the host and produced the expected result. However, since…
9
votes
1 answer

C# DKIMKeySigner Can't open attachments

I'm sending mails to users with attachments. Mails that aren't signed, get a .pdf file (around 64kb) and are working perfectly fine. However, when I sign them for other users, the PDF file becomes around 64 B and can't be opened. I'm not doing…
Paramone
  • 2,634
  • 4
  • 31
  • 58
8
votes
2 answers

RSpec and testing Devise's mailer

I had some issues with sending confirmation emails in Devise. That's why I would like to write tests for this functionality. How could I do this, when I don't create my own mailers? EDIT I decided, that this should be enough: it 'should send an…
ciembor
  • 7,189
  • 13
  • 59
  • 100
8
votes
1 answer

Sending ONLY plain text e-mail, Rails mime part included in body

I have a rails app that sends out many notification e-mails. We have a desire to let the user choose plain text vs html. Initially our desire was always multipart so we didn't set a content type and simplyhad both the email.html.erb & email.text.erb…
JonathanSimmons
  • 1,528
  • 1
  • 16
  • 28
8
votes
1 answer

Rails mailer mimepart visible as text in message body

I'm sending test mail using ActionMailer. The template is being rendered and mail is being delivered fine. The only problem is the mimepart and other header data is displayed by Google in message body. Here is the code that mails.. def testing …
Apoorv Parijat
  • 861
  • 1
  • 10
  • 16
8
votes
5 answers

Custom variables in Devise reset password instructions?

I need to be able to customise the rails devise mailer view for reset password instructions. for this I need to do two things. Specify a custom URL for the link, so that its a host/domain based on a certain business logic. This host and domain…
James Sheil
  • 121
  • 1
  • 5
1
2 3
44 45