It automatically delivers email which says
You have a new message: subject
You have received a new message:
Body
Visit http://example.com/ and go to your inbox for more info
Anyone knows how to customize this template? If possible, I'd like to use i18n for this template form.
Thanks!! .
you need to generate views for the mails that are sent to the user
rails g mailboxer:views
this will generate two different folders in <your rails app>/app
1- notification_mailer - containing template files when a notification is sent to a user
2- message_mailer - containing template files when a message is sent to a user
You can change those templates .
Another thing that you can do is to uncomment/add these lines in /config/initializer/mailboxer.rb
config.notification_mailer = CustomNotificationMailer
config.message_mailer = CustomMessageMailer
and create above two mailers classes which must contain the following function
send_email
the parameters to this function and their implementation is given on this link . You will get a hint of how to write your own send_mail function .
Notification Mailer Send Email function
Message Mailer Send Email function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With