diff --git a/app/mailers/digest_mailer.rb b/app/mailers/digest_mailer.rb index 625b48a29..8f8228be3 100644 --- a/app/mailers/digest_mailer.rb +++ b/app/mailers/digest_mailer.rb @@ -7,7 +7,7 @@ class DigestMailer < ApplicationMailer end @articles = articles.first(6) @digest_email = true - mail(from: "yo@dev.to", to: @user.email, subject: "#{@articles.first.title} #{random_emoji} and #{@articles.size - 1} other top posts from your network.") do |format| + mail(from: "yo@dev.to", to: @user.email, subject: "#{@articles.first.title} #{random_emoji} and #{@articles.size - 1} #{email_end_phrase}") do |format| format.html { render "layouts/mailer" } end end @@ -15,4 +15,15 @@ class DigestMailer < ApplicationMailer def random_emoji ["📖","🎉","🙈","🔥","💬","👋","👏","🐶","🦁","🦊","🐙","🦄","❤️"].shuffle.take(3).join end + + def email_end_phrase + [ + "more posts picked just for you", + "more trending DEV posts", + "other posts you might like", + "other posts you should read", + "other articles picked for you", + "more wonderful posts" + ].sample + end end diff --git a/app/views/layouts/_mailer_content.html.erb b/app/views/layouts/_mailer_content.html.erb index 0565e3bbe..1b1e4d101 100644 --- a/app/views/layouts/_mailer_content.html.erb +++ b/app/views/layouts/_mailer_content.html.erb @@ -179,10 +179,10 @@ PBJ
<% elsif @digest_email %> -