Si8
Si8

Reputation: 9225

Header in email using PHP is showing something different

$sentHeader = "From: Education, Annual <[email protected]>";

Shows up as:

Header

But if I have: $sentHeader = "From: [email protected]";

shows up as From: annualeducation.imed.org;

How do I correct it?

Upvotes: 0

Views: 42

Answers (1)

Barmar
Barmar

Reputation: 781726

Use this:

$sentHeader = 'From: "Education, Annual" <[email protected]>';

Comma is a separator in headers that contain addresses, you need to put the full name in quotes if it contains a special character like this.

Upvotes: 3

Related Questions