Jump to content

How to send an email from php5


rahul_jjj

Recommended Posts

I am using php5 and I am trying to send an email through my script.

 

I have the following code,

$to = "[email protected]";

$subject = "Test mail";

$message = "Hello! This is a simple email message.";

$from = "[email protected]";

$headers = "From: $from";

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

 

what do I configure in my php.ini file for smtp and sendmail_from variables to ..

 

I have something like smtp = localhost and [email protected]

 

Can anyone advise..

 

Rahul

Link to comment
https://forums.phpfreaks.com/topic/134625-how-to-send-an-email-from-php5/
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.