colap Posted July 18, 2015 Share Posted July 18, 2015 http://php.net/manual/en/function.mail.php It is windows 8, wamp server is installed. What package/software to install to send email from windows? Which code to take: <?php // The message $message = "Line 1\r\nLine 2\r\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70, "\r\n"); // Send mail('[email protected]', 'My Subject', $message); ?> Or <?php $to = '[email protected]'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?> Is it needed to write "From address" through mail function? Where to configure "From address" ? Link to comment https://forums.phpfreaks.com/topic/297351-what-packagesoftware-to-install-to-send-email-from-windows/ Share on other sites More sharing options...
Ch0cu3r Posted July 18, 2015 Share Posted July 18, 2015 I recommend you use an existing SMTP service, such as gmail and use PHP scripts such as phpmailer or swiftmailer for sending emails. Link to comment https://forums.phpfreaks.com/topic/297351-what-packagesoftware-to-install-to-send-email-from-windows/#findComment-1516701 Share on other sites More sharing options...
scootstah Posted July 18, 2015 Share Posted July 18, 2015 What package/software to install to send email from windows? Linux! Ha! Just kidding. I agree with Ch0cu3r; setting up email servers sucks. There's lots of very affordable SMTP services these days, like Gmail, that can get you up and running with no problem. Link to comment https://forums.phpfreaks.com/topic/297351-what-packagesoftware-to-install-to-send-email-from-windows/#findComment-1516702 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.