rahul_jjj Posted November 28, 2008 Share Posted November 28, 2008 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 More sharing options...
rhodesa Posted November 28, 2008 Share Posted November 28, 2008 what OS? Link to comment https://forums.phpfreaks.com/topic/134625-how-to-send-an-email-from-php5/#findComment-701017 Share on other sites More sharing options...
rahul_jjj Posted November 28, 2008 Author Share Posted November 28, 2008 In Windows Link to comment https://forums.phpfreaks.com/topic/134625-how-to-send-an-email-from-php5/#findComment-701213 Share on other sites More sharing options...
rhodesa Posted November 28, 2008 Share Posted November 28, 2008 you can't use localhost unless you have a mail server running. try using the one for your ISP Link to comment https://forums.phpfreaks.com/topic/134625-how-to-send-an-email-from-php5/#findComment-701336 Share on other sites More sharing options...
rahul_jjj Posted November 29, 2008 Author Share Posted November 29, 2008 Where will I be able to find the ISP details.? Link to comment https://forums.phpfreaks.com/topic/134625-how-to-send-an-email-from-php5/#findComment-701570 Share on other sites More sharing options...
rhodesa Posted November 29, 2008 Share Posted November 29, 2008 it would be on their website, probably the FAQ. it's the 'outgoing email server' in the directions on setting up Microsoft Outlook to send email. Link to comment https://forums.phpfreaks.com/topic/134625-how-to-send-an-email-from-php5/#findComment-701683 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.