Saturday, September 1, 2018

email - How to connect php to google SMTP and send mail?




I need a help in this issue, i can't connect to smtp and can't send. i tried different solutions from other question but nothing, can someone give me a good explanation step-by-step what to do..i'm new to php. I've done email-sending, sms-sending with python but i can't get good documentation with php. please help. thanks


Answer




I recommend using PHPMailer, heres a example http://phpmailer.worxware.com/?pg=examplebgmail for smtp



$mail->Host = "smtp.gmail.com"; //If you have a business gmail account
Username = "yourusername@gmail.com"; //Your login email username
Password = "yourpassword"; //Your password



For password use a 2-way verification using Admin panel. it would look something like wqhggkdhufjsjkpftj


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...