Jump to content

php send mail


hoponhiggo

Recommended Posts

Hi Guys

 

I have just got the mail function to work using;

 

//send mail
$to = $_POST['email'];
$subject = "Welcome";
$message = "
<html>
<head>
  <title>Welcome</title>
</head>
<body>
<p>Thank you for registering</p>
</body>
</html>
";


// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";


mail($to,$subject,$message,$headers);

 

but i cant figure out where i need to specify who the mail should be from? At the minute, they are being sent from [email protected]

 

How do i change this?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/240131-php-send-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.