I need to send an email using php. here's my code :
$to= "dear-angel@hotmail.fr";
$subject = "demande d'intervention";
$message = "<h1>Demande d'intervention<h1>
Bonjour,<br>
il y a une urgence et on souhaite votre intervention docteur <br>";
$headers = 'From: DRIF <dear-angel@hotmail.fr>' . "\r\n" .
'Reply-To: dear-angel@hotmail.fr' . "\r\n" .
'Content-Type: text/html; charset="iso-8859-1"' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
this is how I configured php.ini file:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = "smtp.live.com"
; http://php.net/smtp-port
smtp_port = 587
username="dear-angel@hotmail.fr"
password="blablabla"
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = "dear-angel@hotmail.fr"
I get this error message :
SMTP server response: 550 5.7.3 Requested action aborted; user not authenticated
I tried to connect to my hotmail account but I didn't find any recent activities so I can confirm that it was me. I heard that I have to use php mailer but I didn't know how to use it
Can you please help me? thanks in advance