Sending mail from localhost

i am trying to find a way to configure my localhost to send test email on my gmail account. is that possible or do i have to some special settings?

This might be of some interest to you

Sending email from localhost using PHP in XAMPP,WAMP,PHPDEV in Windows

This might be of some interest to you

http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html

Does the hosting (web hosting) give u access to php.ini?

You need to use a third party library to connect to Google’s SMTP servers, read the documentation for SwiftMailer; it’s almost the de facto these days.

when i upload my file which got mail() function on server. or should i edit those server’s php.ini file setting coz now its says localhost and port 25. what setting do i need to changed in php.ini for email to be sent from one of my domain’s email

You don’t need to alter the php.ini if you’re sending mail via Google/GMail.

Ah! finally it worked! i made it work. i am getting email.yay! using the mail() function. however now i need to how to pass in the filled in arguments in the message when posted


<?php
 if(isset($_POST['submit'])){
     if(isset($_POST['checko'])){
         $opt = implode("&nbsp;,",$_POST['checko']);
     }else{
        echo ""; 
     }
     //echo $opt;

 }
 $to = "...@gmail.com";
 $subject = "Test Mail";
 $message = "This is test email";
 $from = "...@adc.com";
 $headers = "From : {$from}";
 
 mail($to,$subject,$message,$headers);
?>

i am thinking, maybe i do

$message = $opt

will that be right? how do i send multiple entries in message. like i got


$_POST['fname']

and many more

also i see that when i get my email, the   in my implode is not showing up in email. i even try br coz that what i need but still even the <br> shows up