ssl - Unable to Send Email Using PHP -
preview: have been trying send email using moodle long time , decided test sending email using standard php mail() function test if mail working fine. but php not send email!! problem scenario: this code php: $to = "receiver@gmail.com"; $subject = "test mail"; $message = "hello! simple email message."; $from = "username150@gmail.com"; $headers = "from:" . $from; ini_set( "sendmail_from", "username@gmail.com" ); ini_set( "smtp", "smtp.gmail.com" ); ini_set( "smtp_port", "25" ); ini_set("username","username0@gmail.com"); ini_set("password","password"); mail($to,$subject,$message,$headers); echo "mail sent."; the error : warning: mail() [function.mail]: smtp server response: 530 5.7.0 must issue starttls command first. sz6sm10013088pab.5 - gsmtp in c:\program files (x86)\moodle\server\moodle\u...