Change WordPress Default Email Address

Here is a little tip which concerns the bloggers who use the WordPress CMS. By default, WordPress uses the email «  »  and the name « WordPress » to send some notifications to users. This little piece of code will improve the wp_mail function of WordPress and let you personnalize the sender email and name.

Just add this code into the file functions.php of your WordPress theme, and change and My Name values according your needs.

[icon style= »chain » color= »red »]functions.php[/icon]

[code]
add_filter( ‘wp_mail_from’, ‘my_mail_from’ );
function my_mail_from( $email )
{ return ‘’; }
add_filter( ‘wp_mail_from_name’, ‘my_mail_from_name’ );
function my_mail_from_name( $name )
{ return ‘My Name’; }
[/code]

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.