I have this code to send email using smtp, and i got output- Mail sent successfully with following code
ini_set('SMTP', 'mail.veshraj.com.np');
ini_set('smtp_port', 465);
$message = "Hi \n How are you.";
if(mail('veshraj.joshi1@gmail.com', 'Testing Subject for mail function', $message))
{
echo 'Mail sent successfully';
}
But I did not receive any email, this code is in local machine; If smtp not supported in localhost - then how did frameworks like laravel,yii to do so