2014-05-25 00:54:52 +08:00
|
|
|
class PostMailer < ActionMailer::Base
|
|
|
|
domain = ENV['DOMAIN_NAME'] || 'example.com'
|
|
|
|
|
|
|
|
default from: "no-reply@#{domain}"
|
|
|
|
|
2016-04-27 12:22:37 +08:00
|
|
|
def born(post_id, to)
|
2014-05-25 00:54:52 +08:00
|
|
|
@post = Post.find(post_id)
|
|
|
|
mail to: to, subject: '客官, 新博客来了'
|
|
|
|
end
|
|
|
|
end
|