using the PHP mail function -


i using php mail function send users emails new features , updates. can send email , message no problem. control message from, more email client says from.

for example:

<?php  $to = "someone@gmail.com"; $subject = "test"; $msg = "hello there!"; $headers = "from: someone@shareit.me";  mail($to,$subject,$msg, $headers);  ?> 

in mail client (ie. gmail) user see:

someone test - hello there

i control name of sender via headers. possible?

so email someone@shareit.me name of sender shareit.

thanks

use following headers: (link docs)

$headers = "from: shareit <someone@shareit.me>"; 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -