Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Commonmark migration
Source Link

Check out php mail in the manual

additional_headers (optional)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).

Example from the manual

$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
 'Reply-To: [email protected]' . "\r\n" .
 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

Update:

You also asked about putting the name in the from address. To do this just change the From: in the headers to WEBMASTER NAME <[email protected]>

Check out php mail in the manual

additional_headers (optional)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).

Example from the manual

$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
 'Reply-To: [email protected]' . "\r\n" .
 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

Update:

You also asked about putting the name in the from address. To do this just change the From: in the headers to WEBMASTER NAME <[email protected]>

Check out php mail in the manual

additional_headers (optional)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).

Example from the manual

$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
 'Reply-To: [email protected]' . "\r\n" .
 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

Update:

You also asked about putting the name in the from address. To do this just change the From: in the headers to WEBMASTER NAME <[email protected]>

added 170 characters in body
Source Link
bretterer
  • 5.8k
  • 5
  • 34
  • 54

Check out php mail in the manual

additional_headers (optional)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).

Example from the manual

$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
 'Reply-To: [email protected]' . "\r\n" .
 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

Update:

You also asked about putting the name in the from address. To do this just change the From: in the headers to WEBMASTER NAME <[email protected]>

Check out php mail in the manual

additional_headers (optional)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).

Example from the manual

$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
 'Reply-To: [email protected]' . "\r\n" .
 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

Check out php mail in the manual

additional_headers (optional)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).

Example from the manual

$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
 'Reply-To: [email protected]' . "\r\n" .
 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

Update:

You also asked about putting the name in the from address. To do this just change the From: in the headers to WEBMASTER NAME <[email protected]>

Source Link
bretterer
  • 5.8k
  • 5
  • 34
  • 54

Check out php mail in the manual

additional_headers (optional)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).

Example from the manual

$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
 'Reply-To: [email protected]' . "\r\n" .
 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
default

AltStyle によって変換されたページ (->オリジナル) /