*ATTENTION! UPDATED VIDEO*
If anyone is having problem in sending mail then you can try changing the SMTP port to 465.
The fix of not getting email is here [ Ссылка ]
Watch this video if you can't successfully send email.
Hi, guys in this video you will see how you can send emails from xampp. You can use any email account to send mail from xampp. Watch this video until the end.
CODE:
------------------------------------------------
php.ini file
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = mail@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
-----------------------------------------------------
sendmail.ini file
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=mail@gmail.com
auth_password=yourpassword
force_sender=mail@gmail.com
-----------------------------------------------------
PHP file code
"angle bracket open"?php
//the subject
$sub = "Your subject";
//the message
$msg = "Your message";
//recipient email here
$rec = "example@gmail.com";
//send email
mail($rec,$sub,$msg);
?"angle bracket open"
----------------------------------------------------------------------------
I am also available on :
Facebook: [ Ссылка ]
Quora: [ Ссылка ]
Twitter: [ Ссылка ]
![](https://i.ytimg.com/vi/9W644cyDyNM/maxresdefault.jpg)