Professional Documents
Culture Documents
How To Send Mail From Localhost XAMPP Using Gmail - Milople
How To Send Mail From Localhost XAMPP Using Gmail - Milople
How To Send Mail From Localhost XAMPP Using Gmail - Milople
First, you need to configure XAMPP, once it’s installed. Then, follow the below
steps in order to send mail from localhost using Gmail.
The Steps To Send Mail From Localhost XAMPP Using Gmail:
› SMTP=smtp.gmail.com
› smtp_port=587
› smtp_server=smtp.gmail.com
› smtp_port=587
› error_logfile=error.log
› debug_logfile=debug.log
›
auth_username=milopleInc@gmail.com /*Your Gmail id*/
1 <?php
2 $to_email = "receipient@gmail.com";
3 $subject = "Test email to send from XAMPP";
4 $body = "Hi, This is test mail to check how to send mail from Localhost Using Gmail
5 $headers = "From: sender email";
6
7 if (mail($to_email, $subject, $body, $headers))
8
9 {
10
11
echo "Email successfully sent to $to_email...";
}
12
13 else
14
15 {
16 echo "Email sending failed!";
17 }
Take heed: On the off chance that you are getting an admonition message, at
that point Please arrange “Less secure applications” settings as demonstrated
underneath. Some of the time without turning on the ‘less secure applications’
is the principal reason the client didn’t get the mail.
→ Turn ON from the Less secure app access panel on the bottom of the page.
→ Click “Save”.
Query solved?! If still facing the issue, write in the comment or contact us.
Also Read:
Email*
SUBSCRIBE
Leave a Comment
Your email address will not be published. Required fields are marked *
Your name *
Your e-mail *
Your comments *
SUBMIT COMMENT
Blogs
Terms of Use
Videos
Privacy Policy
Knowledge Base
Career
About Us
GET IN TOUCH
CONTACT US