i'm trying to send mail via PHP code
I'm using Xampp v3.2.2,
I have configured XAMPP to send mail from localhost just like this:
in php.ini :
extension=php_openssl.dll
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = my_id@gmail.com
sendmail_path ="\"C:\xampp\sendmail\sendmail.exe\" -t"
in sendmail function, in sendmail.ini:
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=my_id@gmail.com
auth_password=my_id_password
force_sender=my_id@gmail.com
i'm very sure that this configuration is right, my code is:
<?php
$to = "another_id@hotmail.com";
$subject = "wa a5iran zobtet";
$txt = "Hello world! My first mail with PHP";
$headers = "From: Someone" . "
";
mail($to,$subject,$txt,$headers);
?>
the message is sent but i got this :
Message blocked
Your message has been blocked by another_id@hotmail.com. See technical details below for more information.
The response from the remote server was: Message rejected. See https://support.google.com/mail/answer/69585 for more information.
</div>