Jump to content

cant mail


ngreenwood6

Recommended Posts

I am trying to send mail from my wampserver on a testing machine to ensure that it is working. I have set in the php.ini file the smtp information as so:

 

smtp = smtp.gmail.com

smtp_port = 25

sendmail_from = [email protected]

 

Then I have my file:

 

<?php

$headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: [email protected]' . "\r\n";

mail("[email protected]","Hello","This is a test",$headers);

?>

 

However I am getting this error "Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. 2sm2999557qwi.5 in C:\wamp\www\mail.php on line 5".

 

Any help is appreciated.

 

 

Link to comment
https://forums.phpfreaks.com/topic/123323-cant-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.