tags:

views:

26

answers:

2

Hi,

I have a site in PHP.In this when I send the invitation to people it takes the from address as [email protected] of this I want o display the Mysitename .How can I do.I have the code shown below.

                    $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  $headers .= 'To:'. $value . "\r\n";
  $headers .= 'From:Mysitename'."\r\n";

How can I show like in users email's from address is Mysitename?

Thanks in advance?

+2  A: 
$headers .= 'From: Mysitename <mysitename.com>' . "\r\n";

http://php.net/manual/en/function.mail.php

Galen
Its not working..I already tried this...
vinothkumar
A: 

Maybe something along the lines of:

$headers .= 'From: Mysitename <[email protected]>' . "\r\n";

You need 'From' to be proper email address.

Kamil Szot