Sunday, 15 September 2013

php - Error in using mail function? -



php - Error in using mail function? -

here $msg , $subject variables getting values form. when submit button clicked, mail() function called.

but there warning displayed:

warning: mail(): failed connect mailserver @ "`" port 25, verify "smtp" , "smtp_port" setting in php.ini or utilize ini_set() in d:\wamp\www\abhishek\wp-content\themes\abhishek\career.php on line 18.

here code:

$msg=$_post['msg']; $subject=$_post['subject']; mail('email@example.com',$subject,$msg);

you need setup mail service server locally on machine.the mail service function needs smtp servers sending out mails.so need mention smtp port , smtp host on php.ini file.

.please have @ similar question here

php wordpress email

No comments:

Post a Comment