How To Send Email Using PHP With PHP Mailer | PHP Send Email | Full Step By Step
ฝัง
- เผยแพร่เมื่อ 23 ก.ค. 2024
- How To Send Email Via Gmail Using PHP With PHP Mailer | PHP Send Email SMTP Gmail | Full Step By Step
Source Code :
- bit.ly/sendemaildavidgtechpp (PayPal)
- bit.ly/sendemaildavidgtechsou... (Trakteer)
Asset :
- PHP Mailer = github.com/PHPMailer/PHPMailer
Things you need to do with your gmail that will be a gmail sender (myaccount.google.com/security) :
1. Turn on 2-Step Verification
2. Create an app password
This video will show you how to do these two steps
Chapters :
00:00 - Preview
00:19 - For your information
00:28 - Create file & folder
00:54 - Download phpmailer
01:04 - Copy & paste phpmailer
01:28 - Google account
01:37 - Turn on 2-step verification
02:11 - Create an app password
02:28 - Let's code
07:30 - Preview
07:53 - Thank you
Contact :
GitHub = github.com/davidgrcias
Instagram = / davidgrcias
Gmail = davidgarciasaragih7@gmail.com
Music :
1. Innocence by Roa | / roa_music1031
Music promoted by www.chosic.com/free-music/all/
Creative Commons CC BY 3.0
creativecommons.org/licenses/...
2. Breeze by MusicbyAden | / musicbyaden
Music promoted by www.chosic.com/free-music/all/
Creative Commons CC BY-SA 3.0
creativecommons.org/licenses/...
3. Music by Wavecont,
Licensed under creative commons Attribution-ShareAlike 4.0 International
creativecommons.org/licenses/...
Music promoted by
---
Tags :
how to send email using php with php mailer | php send email | full step by step,how to send email via gmail using php with php mailer | php send email smtp gmail | full step by step,php,phpmailer,send email php,php gmail,gmail php,php send email,send gmail php,php send gmail,send email php,php send gmail,php mail gmail,send gmail using php,send email phpmailer,send email php,send email php smtp,send email php localhost,send email php contact form,send email using php,send email using python,send email using javascript,send email with python,send email from html form javascript,send email with javascript,send email php,send emails from a html contact form,send email using java,send email php smtp,send email php contact form,send email phpmailer gmail,send email php using gmail smtp server,send email php using google smtp server,send mail php,send mail php cpanel,send email using phpmailer,send email with php from html form on submit,send gmail,send gmail message,send gmail with python,send gmail using php,send gmail using python,send email from python,php send email to gmail,php send email verification code,php send mail using smtp server,php send email from localhost,php send mail,php send mail from localhost,php send message,php send email with attachment,php send email using phpmailer,php form send email on submit,send email from localhost and php,laravel send email,codeigniter send email,how to send email on gmail,how to send email using python,how to send email php,how to send email php localhost,how to send email php smtp,how to send email php html,how to send mail php,how to send email using php,how to send email using phpmailer,how to send email in php with html format,how to send email through php,how to send email from php using gmail,how to send email in php using smtp,how to send email in php codeigniter,how to send email in php step by step,php how to send email,php how to send email from localhost,php how to send gmail,php how to mail from localhost,php code to send email from contact form,php code to send email from website,php send email using phpmailer and gmail smtp,php send sms,php send email form,php send email library,php send email api,php send email example,php send email demo,php send email source code,send email php source code,send email php example,send email php demo,php mail() function - w3schools,how can i send an email using php?,php - sending emails using php,how to send emails with php mail() function and php mailer,how do i send php mail via smtp
,can i send email from localhost php?,how to send text and html emails in php,guide: how to send emails in php (with examples) - mailersend,how to send an email using php,php send email form,php mail function not working,how to send an email via gmail smtp server using php,send emails via smtp with gmail and phpmailer,send email in php using gmail and phpmailer (2022),how to send email using gmail api,how can i send mail from localhost using gmail smtp in php?,how to send email to gmail using phpmailer in php,php send email smtp gmail,send mail using smtp in php example,send mail using smtp in php example download,how to send mail in php from localhost,sending email with phpmailer,how to send mail in php from localhost,send email laravel,php send email smtp script,setup phpmailer,phpmailer gmail smtp example,email
This video helped me alot... I had my website on some server and that server is not allowing php mail function, due to which i changed my hosting server. Later i had to change to initial one again and they told me you can use SMTP function for emails. Thanks again
Glad to hear that! You're welcome, thanks for watching...
Please, I am having the same problem. What changes did you make? How did you resolve it?
@@abanwaraphael1526 same problem...plz help me
@@hashmatmohammed5807😮
Thank you . I were stucked whole night on my university project. Finally you saved me.
You're welcome! I'm glad that my work could help you with your university project. If you have any further questions or need any additional help, don't hesitate to reach out. Best of luck with your studies!
what was your project
Thank you! I was struggling to get this working for 2-3 hours before I stumbled upon your video.
Great! You're welcome.. Thanks for watching!!
Your video saved me. I spent 6 hours looking for good tutorials and yours is the only one that worked. Thank you so much, keep up with your good job.
How the App Passwords in the google account is missing
Hi @CanalJIT,
I'm so glad to hear my video helped you! 😊 It means a lot to know that my tutorial worked for you after your extensive search. Thank you so much for your kind words and support. I'll keep working hard to create more helpful content. 👍
Hi @muchSwagcom,
If the App Passwords option is missing in your Google account, it might be because two-factor authentication (2FA) is not enabled. App passwords are only available if 2FA is turned on. To enable it, go to your Google account security settings, enable 2FA, and then you should see the option to generate app passwords. Hope this helps! 😊
Thank you, David!
Still helpful
I have solved my task
Subscribed!
You're welcome! I'm glad to hear that the content was helpful and that you were able to solve your task. Thank you for subscribing as well! If you have any further questions or if there's anything else I can assist you with, please don't hesitate to let me know.
Finally, Email has been sent Successfully.
Congratulations on successfully sending your email using PHPMailer! I'm glad to hear that the tutorial was helpful and that you were able to achieve your goal. If you have any other questions or if there's anything else I can help you with, please don't hesitate to ask. Thanks for watching!
3 gruelling hours of debugging and head-scratching and finally this tutorial woks
Awesome!
Simple, fast, with every step needed. Just great. Thank you!
Thank you so much for your positive feedback! I'm glad you found the tutorial simple, fast, and comprehensive. Thank you for watching the video!
@@DavidGTechClass PHPMailer not found
Thanks man, thanks to this video I solved the error and saved my sanity!
You're welcome! Thanks for watching...
Thanks a lot after trying 4 days hardly with many researches to to send the email I did it successfully thanks to you.
You're very welcome! I'm happy to hear that my content was able to help you solve the problem you were having with sending emails. If you have any further questions or need any additional assistance, please don't hesitate to ask.
Love youu guy______this video helped me a lot after trying for 2hours finally happenned in two minutes
Glad to hear that! Thanks for watching...
Thanks man. Your video helped me configure phpmailer.🙂
You're welcome! Thanks for watching...
ty mai fren, new suscraiber and one mor like.
You're welcome!!! Thanks for watching...
subscribed! will watch every video from now on!
dont stop doing good work!
Thank you...
Thank you very much, it helps a lot with my project.😀😀😀
You're welcome!!! Thanks for watching...
wow look how fast i learnt from your videos. its simple and easy to understand
Hey @lildive,
Wow, I'm absolutely thrilled to hear that you found the tutorial helpful and learned quickly! 🚀 It's fantastic to see your progress. If you ever have more questions or if there's anything specific you'd like to learn, feel free to drop a comment or reach out.
Keep up the fantastic work, and happy coding! 🌟
Thanku so much u save my 3 4 days this video very helpful thank you so much 🥰🥰
You're welcome! I'm glad to hear that the video was helpful and saved you time. If you have any more questions or need further assistance, please don't hesitate to ask. Have a great day!
Thank you for the video, wish you all the best
Thank you 😭 you have just saved me from myself
You're welcome!!! Thanks for watching.
thank you, i have been finding suitable video for many days
@CodePraiseGod-oj9ig
You're welcome! If you have any more questions or need further assistance, feel free to ask. I'm here to help you with anything related to PHP, MySQL, or any other programming topics you may have. Happy coding!
Thank you so much, you save my team sir 🤗
You're very welcome! I'm glad that I could help save your team. If you need any further assistance in the future, please don't hesitate to reach out to me.
I don't know how to thank You. you've done a great work for me.
Thank you so much for your kind words! I'm thrilled to hear that the tutorial was helpful to you. If you have any more questions or need further assistance, feel free to ask me.
@@DavidGTech❤❤
owesome i have the fear of this code but i have done .. thank you sir .. you resolve my problem
Glad to hear that!!! You're very welcome!!! Thank you for watching!!!
You are legend for sure thanks mate ! God bless you
You're welcome mate, God bless you too!!! By the way, I have made other video like this too but more easy because with JavaScript only th-cam.com/video/l8R7O4zckj8/w-d-xo.html, hope this video can help you more!!
Thank you, sir!!! it really helps!
You're very welcome! I'm glad to hear that my content was helpful to you. If you have any more questions or topics you'd like me to cover, please don't hesitate to let me know. Best of luck!
Thank u so much ,finally made it🤗
You're welcome! Thanks for watching.
mantul bro David
아 너무 감사합니다 !!! So~~~~~ Thanks You !!!
You're welcome!!! Thank you for watching my video...
Very cool info thank you ... subscribed🙂
You're welcome! Thanks for watching and subscribe...
@@DavidGTech I happy to found info like these .. , thanks for that.
Thank you so much for this video it really helpful for me to finish my project assignment!!!🙏🙏
Did it work with Gmail?
@@srabonxYes
You're welcome! I'm glad to hear that the video was helpful for you in completing your project assignment. If you have any further questions or need any more assistance, feel free to let me know!
Simple and straightforward men
Thank you @surafelkaleab5902!!!
Thank you so much! Helped solve my problem but now Ive got more questions. lol
Hi @tomshobbylife,
You're very welcome! I'm glad to hear that the video helped you solve your initial problem. Don't worry about having more questions-that's completely normal, and I'm here to help!
Feel free to ask any additional questions you have about sending emails with PHP using PHP Mailer. Whether it's about customization, troubleshooting, or any related topic, I'm here to assist you. Just drop your questions in the comments, and I'll do my best to guide you through.
Keep up the good work, and happy coding! 🚀
@@DavidGTech thank you so much. I will reach out if anything pops up. I think a lot of my problem is practice. Time is so hard to find to practice and I'm struggling. Lol. Again thank you for your help and being available.
Thank you man, it worked like a charm
You're welcome!
Thanks a lot
It was helpful!
Glad it helped! You're welcome!!! Thanks for watching...
Thank you. It is very helpful.
You're welcome! I'm glad to hear that the information was helpful for you. If you have any further questions or need any additional assistance, please don't hesitate to reach out.
Thanks so much it really helped me out 😊
Glad it helped!
you helped me so much honestly!
Thank you so much for your kind words! I'm thrilled to hear that I was able to help you. If you have any more questions or need further assistance, please feel free to ask. I'm here to help you!
thank you so much for making this video
You are so welcome! Thanks for watching...
good video, very educative
Thanks for watching...
thank you ssoooooo mmmmuuuuuccchhhh!!!
You're very welcome!!! Thanks for watching!!!
Bro thank you a lot you are awesome🥰
Great! You're welcome, thanks for watching!!!
Thank You so uch ... it was helpful
Glad to hear that! You're welcome!!! Thanks for watching...
Mantappp mas 👍👍
Thank you
Thanks brother, it worked because of you.
Hi @rajpuri5109,
Glad to hear that! 😊 Happy to help, and thanks for watching!
This video helped me alot .
I'm glad to hear that the video was helpful for you! Thank you for taking the time to share your feedback. If you have any further questions or if there's anything else I can assist you with, please don't hesitate to let me know.
thank you Subscribed!
You're welcome! Thanks a lot!!!
The requested URL was not found on this server.
Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/8.1.6 Server at localhost Port 80 ?
Help? :c
if u have an antivirus running on ur pc,disable it and try it again.....if this doesnt work try to re-install your xamp server without blocking any features of it
Thank you for reaching out and bringing this issue to my attention. I'm sorry to hear that you encountered the error message. This error message is usually related to a server configuration problem, and it seems like there might be a misconfiguration or an issue with your local server settings. Here are a few steps you can follow to troubleshoot and potentially fix the problem:
- Double-check the URL: Make sure you've entered the correct URL in your browser. Verify the protocol (http/https) and the path to the PHP script or file you are trying to access.
- Check the file's location: Ensure that the PHP script you are trying to access is in the correct directory on your local server. The file path specified in the URL should match the actual location of the PHP file.
- Restart your server: Sometimes, restarting your local server can resolve temporary configuration issues. Stop and restart your Apache server and try accessing the URL again.
- Review server logs: Check the Apache server logs for any error messages or clues about the issue. Error logs can provide valuable information that might help identify the problem.
I hope these steps help you in resolving the problem. If you have any further questions or encounter any other issues, don't hesitate to let me know, and I'll do my best to assist you.
Thank you so much David
You are very welcome!!! Thanks for watching!!!
Tysm David
You're very welcome!!!
this video saved my job thankyou bro
Hi @gokulgokul7523,
I'm so glad to hear that! 😊 Thank you for letting me know, and I'm happy I could help!
thank you very much it helped me alot
Glad to hear that! You're welcome!
Thank you for helping!
You're very welcome @liskookmanoban6023!!!
Thanks friend you help me a lot
You're very welcome! I'm glad that my tutorial was able to assist you. It's always a pleasure to hear that my content is helping people and making a positive impact. If you have any further questions or feedback, please don't hesitate to reach out. Thank you for taking the time to leave a comment and let me know that my tutorial was helpful to you.
Thank you so much!
You're welcome! Thanks for watching...
Nice tut video bro, thanks
Thank you so much for your kind words!
thanks man, love you
You're welcome! Thanks for watching
Thank you!! was stack
You're welcome!!! Thanks for watching.
you are the best!!!
Glad to hear that!!! Thanks for watching!!!
thank u sir l have solved my task
Great!!! You're very welcome!!! Thanks for watching!!!
Thank You Very Much its work
You're welcome! Thanks for watching...
thx for the video but why the email is FROM the email inside the SENT section of the email, instead of TO the email in the INBOX
Thank you for watching my video!! The email's "FROM" address is typically set to the sender's email address to ensure that recipients can see who sent the email. The "TO" address, on the other hand, represents the email address of the recipient in the inbox.
If you have any further questions or need more clarification, feel free to ask!
Thanks a lot pal
You're welcome! Thanks for watching...
thank You very much
You are welcome!! Thanks for watching!!!
Thanks a lot, sir
Hi @ON10_RIYA_,
You're welcome! 😊 Glad I could help!
Works Perfectly
Thanks for watching...
Thankyou so much
Hi @jaibansal2453,
You are so welcome! 😊
Thank you very much.
You're very welcome!!! Thanks a lot for watching!
Thank you so much ❤
You're very welcome!!!
thank youuuuu. this video helped a lot
Hi @GabRiel-nf5vo,
Thank youuuuu! 😊 I'm glad the video helped you a lot!
Thank you so much
You're we
Can you when i click on plce order it will automatically send on user account how to do this in php
Hi @user-le3xq7nx3h,
To automatically send an order confirmation to the user account upon clicking "Place Order," you can use PHPMailer or the mail() function in PHP to send an email. Here's an example using PHPMailer:
$mail->addAddress($user_email); // Add the user's email address here
$mail->Subject = 'Order Confirmation';
$mail->Body = 'Your order has been placed successfully.';
$mail->send();
Replace $user_email with the user's email address.
Thank you
You're welcome 😊
Please make more video like this sir
Hi @QuantumNebula42,
Thank you so much for your kind words and the request! I'm delighted that you found the video helpful. Your feedback encourages me to create more content. If you have any specific topics or concepts you'd like me to cover in future videos, please feel free to share your suggestions. I'm here to help and create content that meets your interests. Stay tuned for more, and happy coding! 🚀😊
why doesn't he send the requests to me, but if one includes his mail does it get to him? I want all requests to go to my email
Thank you for your comment! In the video tutorial, the demonstration might include sending the requests to a specific email address for the sake of simplicity and illustrating the email sending process. However, you can modify the code to make sure that all the requests are sent to your desired email address.
Thanks alot ❤️❤️❤️
You're welcome!
very helpful 👍
Glad to hear that! Thanks for watching...
I can't stop dancing with a music like that :'D ...and i can't work too...thx for this tuto
🤣🤣🤣👍👍, you're welcome!
Hey guy
Thank u so much, its perfectly work
Now how can I design my email message body (template)
You're welcome! Thanks for watching...
thank you!!! it works :)
Hi @andresdrimer! You're welcome! I'm glad to hear it works for you. Enjoy using the solution!
thanks for this
You're welcome! Thanks for watching...
you solved my problem thanks
You're very welcome!
thanks guy it's solved !
You're very welcome! Thanks for watching...
Thank 👍
You're welcome!!! Thanks for watching.
epic this works thanks dude
Hi @user-ug3qj3gv9j, I'm thrilled to hear that the tutorial worked for you! 😊 If you have any more questions or if there's anything else you'd like to learn, feel free to let me know. Happy coding!
👌👌👌
Thanks for watching...
U saved me😊
Glad to hear that!!! Thanks for watching
i copy your code 100% except the email addres and password but when i click submit button on form it getting me to the send.php file and in browser sent 405 error 'this page isnt working' what's wrong then?
Hi @halimal7510,
A 405 error usually means that the HTTP method is not allowed. Make sure your form is using the correct method (POST or GET) and that your server is configured to handle it. Double-check your server settings and let me know if you need more help! 😊
why is it giving an error: Uncaught PHPMailer\PHPMailer\Exception: SMTP Error: Could not connect to SMTP host. Failed to connect to server in . Someone help me!!!!
I got the same problem, do you have a solution?
@@de48brinformatique52 Check your interrnet connection.
If you're receiving an error message like "Uncaught PHPMailer\PHPMailer\Exception: SMTP Error: Could not connect to SMTP host. Failed to connect to server", it usually means that there is an issue with your SMTP settings or your server is not able to connect to the SMTP host.
tq for the tutorial
You're very welcome!!! Thanks a lot for watching!
Thank you. It worked.
@Dead_Soul77 You're welcome! I'm glad to hear that it worked for you. If you have any other questions or need more help, feel free to reach out!
Thanks a lot for sharing
My pleasure
Can we add more field like phone number address or anything? Please solve this.
Thank you for watching my video and sharing your thoughts! I appreciate your feedback and interest in expanding the content.
In the current video, I focused on demonstrating how to send emails using PHP with PHP Mailer. However, I understand that adding more fields like phone number and address could be valuable for some viewers.
To address your request, I'll consider creating a follow-up video that covers additional fields and customization options. This way, we can explore more functionalities and make the process even more practical for a broader audience.
Keep an eye on my channel for future updates and new content. If you have any other specific suggestions or questions, feel free to let me know, and I'll do my best to help.
very nice video
Thanks
Thank you
You're welcome! Thanks for watching
browser downloads php file instead of opening it. it did open index.html but when I change it to index.php browser downloads it, can you help me with it?
Make sure that you follow all of the codes correctly, thanks.
Nice video
👍 my texts are landing to the spam instead of inbox though.
Thank you @denniskoome5319
God bless you
Hi @lehulutube7147,
God bless you too! 🙏 Thank you for your kind words!
i have a problem about a turning on 2-step virification google remove this option in the laste update
In the latest update, Google still have 2 step verification option
How to add multiple addresses? Can add that email which is not associate with actaual email and Pass?
Hi @muhammadbabar9836! To add multiple email addresses, you can separate them with commas. For sending emails from an address not associated with the actual email and password, you need to set the 'From' field in PHPMailer, but make sure you have permission to use that address.
Thanks bruy
You're welcome! Thanks for watching...