その2:プラグインを使う方法
その1:コードを書く方法
テーマのfunctions.phpに以下のようなコードを追記することで実現できます。送信元のメールアドレスの変更
add_filter( 'wp_mail_from', function( $email ) {
return 'webmaster@example.com';
});
参考:Plugin API/Filter Reference/wp mail from « WordPress Codex
送信元の名前の変更
add_filter( 'wp_mail_from_name', function( $name ) {
return '送信元の名前';
});
参考:Plugin API/Filter Reference/wp mail from name « WordPress Codex
その2:プラグインを使う方法
![](/wp-content/uploads/blog-card/ja.wordpress.org/plugins/wp-mailfrom-ii//opg-150x128.png)
Allows you to configure the default email address and name used for emails sent by WordPress.
これをつかえばOKです。
スポンサーリンク
コメントを残す