mailer

php mailer and html includes with php variables

佐手、 提交于 2019-11-28 18:26:38
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 = $data['start_time']; $mail->IsHTML(true); // set email format to HTML $mail->Subject = "You have an event today"; $mail->Body = file_get_contents('../emails/event.html'); $mail->Send(); // send message my question is, is it possible to have php variables in event.html ? i tried this with no luck (below is event.html).. <table width='600px' cellpadding='0'

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

半腔热情 提交于 2019-11-27 14:28:52
问题 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 file. But I want to make it dynamic to change it by pulling data from DB. 回答1: you can change it in devise.en.yml file in intilizer directory And set your own subject for any mailer mailer: confirmation_instructions: subject: 'Confirmation