Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('wp_mail_from', 'new_mail_from');
- add_filter('wp_mail_from_name', 'new_mail_from_name');
- function new_mail_from($old) {
- return 'info@hoge.jp'; // 変更したいメールアドレスを入力
- }
- function new_mail_from_name($old) {
- return 'ほげほげ管理者';//サイト名を入力
- }
- //よく見ると返信先(reply-to)が wordpress@ドメイン名のままなので、これも変更
- function custom_reply_to($header) {
- $header['Reply-To'] = 'info@hoge.jp';
- return $header;
- }
- add_filter('s2_email_headers', 'custom_reply_to');
- //Subscribe2 独自のフィルターがあったようです。ここも以下をつけたして書いておけば、このフィルターだけでもOKな気がします。
- $header['From'] = "ほげほげ管理者<info@hoge.jp>";
Add Comment
Please, Sign In to add comment