Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29927

PHP's mail() with "To:" in header

$
0
0

In PHP's official manual, for mail function an example is given like:

$to = 'johny@example.com, sally@example.com';
$headers[] = 'To: Mary <mary@example.com>, Kelly <kelly@example.com>';
..
mail($to, $subject, $message, implode("\r\n", $headers));

What's difference between giving recipient's email address in header vs in $to above? Which one should i use?


Viewing all articles
Browse latest Browse all 29927


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>