<?php
add_filter('wp_mail_from','mail_from');
add_filter('wp_mail_from_name','mail_from_name');
function mail_from()
{
global $mail_from_opt;
if (empty($mail_from_opt['username'])) : $username = "Bhumika"; endif;
$domainname = strtolower( $_SERVER['SERVER_NAME'] );
if ( substr( $domainname, 0, 4 ) == 'www.' ) {
$domainname = substr( $domainname, 4 );
}
$emailaddress = $username.'@'.$domainname;
return $emailaddress;
}
function mail_from_name()
{
global $mail_from_opt;
if (empty($mail_from_opt['sendername'])) : $sendername = "Bhumika"; endif;
return $sendername;
}
?>
:)
:)
No comments:
Post a Comment