Jhonny Afonso
Jhonny Afonso

Reputation: 301

Change From name PHP mail

I have a question

I have a php module that sends mail, and works fine, but I have a problem.

When I receive the mail in the From name I receive this [email protected]. What I want is to leave only the name.

I have this code

$email_from2="[email protected]";
    $headers .= 'From: Page.com' . $email_from2 . "\r\n" .
            'Reply-To: ' . $email_from2 . "\r\n" .
            'X-Mailer: PHP/' . phpversion();

Please help

Upvotes: 0

Views: 73

Answers (1)

David
David

Reputation: 1144

If you have problems sending with mail(), use the PHPMailer library: https://github.com/PHPMailer/PHPMailer

Upvotes: 1

Related Questions