Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Created November 30, 2012 14:43
Show Gist options
  • Save claudiosanches/4176176 to your computer and use it in GitHub Desktop.
Save claudiosanches/4176176 to your computer and use it in GitHub Desktop.
Wordpress - Custom mail settings
<?php
/**
* Custom Mail from name
*
* @param string $name Old from name.
*
* @return string New from name.
*/
function cs_custom_mail_from_name( $name ) {
return 'Nome do jovem ou do blog';
}
add_filter(' wp_mail_from_name', 'cs_custom_mail_from_name' );
/**
* Custom mail from
*
* @param string $email Old mail from.
*
* @return string New mail from.
*/
function cs_custom_mail_from( $email ) {
// É extretamente importante usar um e-mail que use o seu domínio!
// Com certeza se não tiver o seu domínio vai cair em spam antes de chegar na sua caixa postal!
return '[email protected]';
}
add_filter( 'wp_mail_from', 'cs_custom_mail_from' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment