PHP mail() - change sender email address

176 views Asked by At

My site is host by proserwer.pl. When I try send mail to gmail.com like that:

$headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
        $headers .= 'From: "Admin My-Site.PL" <admin@my_site.pl>'."\n";
        $topic = $lang['Active_Account_Email'];
        $topic = '=?UTF-8?B?' . base64_encode($topic) . '?=';
        $message = 'message';
        if ( mail($email, $topic, $message, $headers) )
        {
            return TRUE;
        }

My sent email always is in SPAM. The problem is sender email: [email protected] How I can change this email?

0

There are 0 answers