Тёмный
No video :(

Send Email from localhost with PHP using PHPMailer and Gmail SMTP server 

Digital Fox
Подписаться 3,7 тыс.
Просмотров 26 тыс.
50% 1

In this video we are going to create a contact form, and we will
using PHPMailer and Gmail's mail server to send emails from
our localhost server.
Download PHPMailer from Github:
github.com/PHP...
Create an Google App Password:
support.google...
You can buy me a coffee and get the whole source code in a zip file.
www.patreon.co...
Read the article, on my website:
digitalfox-tut...

Опубликовано:

 

25 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 74   
@peggo-channel
@peggo-channel 4 месяца назад
after literally days or researching and frustration, finally one tutorial that actually works on Mac and Xampp, and Gmail using this SMTP method. Thank you so much!
@DigitalFox-tutorials
@DigitalFox-tutorials 4 месяца назад
Glad it helped!
@ahmedelkhateeb4213
@ahmedelkhateeb4213 14 дней назад
you are a great person, you solved a big problems I faced with a very smart, simple and organized way. thank you so much
@DigitalFox-tutorials
@DigitalFox-tutorials 11 дней назад
Glad it helped! Thank you.
@matiasluhmann9534
@matiasluhmann9534 7 месяцев назад
NO TENGO PALABRAS PARA DESCRIBIR LO QUE ME AYUDO TU VIDEO, MUCHISIMAS GRACIASSSSSSSSSSSSSSSSSSSSS
@DigitalFox-tutorials
@DigitalFox-tutorials 7 месяцев назад
Thank you, glad to help
@Yem17
@Yem17 2 месяца назад
Literally worked first try, thank you!
@DigitalFox-tutorials
@DigitalFox-tutorials 2 месяца назад
Great to hear!
@claytonzulu4054
@claytonzulu4054 14 дней назад
You areeeeee awessssssoooooooommmmmeeeee!
@DigitalFox-tutorials
@DigitalFox-tutorials 11 дней назад
Thank you
@edwinng9916
@edwinng9916 5 месяцев назад
Nice video, i sure it can help me get a better grade for my project
@DigitalFox-tutorials
@DigitalFox-tutorials 5 месяцев назад
Glad to hear that!
@andasfs
@andasfs 6 месяцев назад
great tutorial! do you use xampp to run it on locahost? because, i have a problem, when i press submit to send the email, it loads infinitely and i don't get a success or fail message, any ideas what the issue could be?
@andasfs
@andasfs 6 месяцев назад
nevermindi i found the problem, i typed the port number wrong, thanks again, i really appreciated this tutorial!
@miltonoliveira308
@miltonoliveira308 9 месяцев назад
TOOOOP, great!!! You are incredible!!! You save me. 🤣🤣🤣
@DigitalFox-tutorials
@DigitalFox-tutorials 9 месяцев назад
Happy to help!
@Rudy-RickEstacio
@Rudy-RickEstacio 3 месяца назад
Why is mine error shows You must provide at least one recipient email address
@mk123418
@mk123418 5 месяцев назад
I see a lot of tutorials that show us how to send emails from the same adress, but how to do this with 2 adresses ??
@DigitalFox-tutorials
@DigitalFox-tutorials 5 месяцев назад
You can create an array which will hold all the email addresses and use a loop , to execute the code multiple times.
@gknowone1392
@gknowone1392 8 месяцев назад
Good tutorial - Well explained! 👍
@DigitalFox-tutorials
@DigitalFox-tutorials 8 месяцев назад
Many thanks!
@DigitalAdamTech
@DigitalAdamTech 4 месяца назад
After submitting the form the email goes to the email address that the end-user enters in the form, not my gmail address. I double-checked everything and I didn't notice anything out of the ordinary. Please advise, thanks.
@DigitalFox-tutorials
@DigitalFox-tutorials 4 месяца назад
Hey, set in the setAddress method the email address where the email goes. $mail->addAddress(youremail). Also change the send from method to the email that the user types in the form. $mail->setFrom(Users-email);
@intelpix
@intelpix 2 месяца назад
Thanks for the info. One question, why there is no Html file, does the index.php replaces it? Thank you!
@DigitalFox-tutorials
@DigitalFox-tutorials 2 месяца назад
It's basically the same. When we include PHP in our home page, we give it a .php extension (index.php). If not we name the file (index.html).
@Vishal-ip5cw
@Vishal-ip5cw 7 месяцев назад
Very thank you sir ❤❤❤🎉🎉🎉🎉😊
@DigitalFox-tutorials
@DigitalFox-tutorials 7 месяцев назад
Most welcome
@benjaminmanalastasix7634
@benjaminmanalastasix7634 4 месяца назад
Got an error from index.php that I can't call the sendEmail function? I put require to link my script.php but still error. Where did I go wrong?
@DigitalFox-tutorials
@DigitalFox-tutorials 4 месяца назад
Check your code again, 90% of all errors are misspelled words.
@theweekndlyrics7591
@theweekndlyrics7591 6 месяцев назад
Thank you man
@vuthasokban5898
@vuthasokban5898 12 дней назад
got problem with exception file because it couldn't be found even thought it was existed. can you tell me how to solve that ?
@DigitalFox-tutorials
@DigitalFox-tutorials 6 дней назад
Hey check for any typo in the lines of code where you include the namespaces in the script.php file. Check out the code on my website: digitalfox-tutorials.com/tutorial.php?title=Send-Email-in-PHP-using-PHPMailer-and-Gmail
@NemaIme-oz7hs
@NemaIme-oz7hs 4 месяца назад
This is like 10th video that does not work. Is there working contact form in 2024 or do i need to use wordpress ? thanks
@DigitalFox-tutorials
@DigitalFox-tutorials 4 месяца назад
I am sorry that you are struggling with this matter, but i am 100% sure that the code is working. Copy and paste the code from my website: digitalfox-tutorials.com/tutorial.php?title=Send-Email-in-PHP-using-PHPMailer-and-Gmail Let me know if you get it to work .
@roastedChick3n
@roastedChick3n 7 месяцев назад
I'm so thankful to you!!! If you have a donation link, just link it below I just wanna express my gratitude. thank you thankyouuuu. U earned a subscribe!!!
@DigitalFox-tutorials
@DigitalFox-tutorials 7 месяцев назад
Wow, thank you. You can buy me a coffee through my website if you feel like it. digitalfox-tutorials.com/tutorial.php?title=Send-Email-in-PHP-using-PHPMailer-and-Gmail
@phpstudy8625
@phpstudy8625 6 месяцев назад
Super BRO !!!
@DigitalFox-tutorials
@DigitalFox-tutorials 6 месяцев назад
Thanks 🔥
@SaiRam-mo6pu
@SaiRam-mo6pu 2 месяца назад
It supports localhost by xampp server ??
@DigitalFox-tutorials
@DigitalFox-tutorials 2 месяца назад
Yes, the code runs in any kind of a local server.
@domnsync
@domnsync 13 дней назад
Hello, thanks for the tutorial. I use app password but it's not working. It was working before, suddenly stopped. Is it xoauth2 related?
@DigitalFox-tutorials
@DigitalFox-tutorials 11 дней назад
Hey, I am not sure but check your Gmail settings. Make sure that you have two step verification enabled.
@domnsync
@domnsync 10 дней назад
It's already enabled. I've found out that xoauth2 setting is needed. There's no other way. I'm trying to implement it to my project.
@NedumEze
@NedumEze 8 месяцев назад
Thank you so very much sir. Please, may I ask, did you make any settings changes in your php.ini file?
@DigitalFox-tutorials
@DigitalFox-tutorials 8 месяцев назад
You don't have to make any changes.
@NedumEze
@NedumEze 8 месяцев назад
@@DigitalFox-tutorials Thanks a million, Sir.
@ianrobson9612
@ianrobson9612 6 месяцев назад
Firstly thank you for such a great video. I downloaded the source code from your page a I could not get it to work properly when I entered the code myself it kept on telling me email sent successfully when i opened the page. Now the page will not open and i notice that the code for the index.php is not the same as you have on the video. It does not have the validation test only the submit. Have I done something wrong?
@DigitalFox-tutorials
@DigitalFox-tutorials 6 месяцев назад
Hey, i am glad you liked the video. I checked the code on the website, it's all there. I think that you didn't copied the whole index file which includes the email form. There are two code snippets to copy. Visit the article again and go carefully through the code. You will see what you have missed.
@ianrobson9612
@ianrobson9612 6 месяцев назад
I actually purchased the download and copied it across and those were the files I was referring to. The index file i was talking about has the fields automatically filled in. Also a quick question with the google 16 digit code do we remove the spaces between the sets of 4 letters or leave them in? Thanks for all your help
@DigitalFox-tutorials
@DigitalFox-tutorials 6 месяцев назад
Hey thanks Ian. No spaces between the characters.
@ianrobson9612
@ianrobson9612 6 месяцев назад
I got the email to send but the index file that I am refering to is the file I downloaded from patreon it did not have the if empty test at the top of the index file as in the video just the submit test and it always displays "email send successfully" and if the email field is empty it crashes as to be expected.
@DigitalFox-tutorials
@DigitalFox-tutorials 6 месяцев назад
@@ianrobson9612 You are right, i just checked the source code. I also got a test mail on my Gmail digitalfox account, i think it's from you. I will reply to that email sending you the updated source code in a zip file. Tell me if you get it.
@moimoikimoimoiki7211
@moimoikimoimoiki7211 4 месяца назад
SMTP Error: Could not authenticate. how to fix it?
@DigitalFox-tutorials
@DigitalFox-tutorials 4 месяца назад
Check your login details.
@moimoikimoimoiki7211
@moimoikimoimoiki7211 4 месяца назад
@@DigitalFox-tutorials thanks already fix but email after receipt I see at my mail (To and From) also same email
@jzyrussortigosa1214
@jzyrussortigosa1214 7 месяцев назад
what if I use localhost?
@DigitalFox-tutorials
@DigitalFox-tutorials 7 месяцев назад
Yes you can use your localhost server.
@user-sr9nh3lc2x
@user-sr9nh3lc2x 7 месяцев назад
Wow i am excited that you explained everything in detail and simply.thank you❤
@DigitalFox-tutorials
@DigitalFox-tutorials 7 месяцев назад
Thank you, i am glad you liked it.
@user-sr9nh3lc2x
@user-sr9nh3lc2x 7 месяцев назад
@@DigitalFox-tutorials could you please create a booking calendar for us, please.i have tried and managed to create the calendar but when a person chooses the date and the time something is going wrong 😞.
@DigitalFox-tutorials
@DigitalFox-tutorials 7 месяцев назад
@user-sr9nh3lc2x . I never coded one. It's a good tutorial idea. I will try.
@niitpatole7744
@niitpatole7744 8 месяцев назад
It's not working on live server..using GoDaddy hosting... please help
@DigitalFox-tutorials
@DigitalFox-tutorials 8 месяцев назад
It should work. Download the source code from my website, in case that you have something misspelled. digitalfox-tutorials.com/tutorial.php?title=Send-Email-in-PHP-using-PHPMailer-and-Gmail
@niitpatole7744
@niitpatole7744 7 месяцев назад
@@DigitalFox-tutorials it's working on localhost but not working on GoDaddy hosting
@InnestiAmbient
@InnestiAmbient 7 месяцев назад
Same problem here. Did you have any luck at any point? @@niitpatole7744
@rockiidan2100
@rockiidan2100 8 месяцев назад
Help sir
@DigitalFox-tutorials
@DigitalFox-tutorials 8 месяцев назад
With what?
@MS39550
@MS39550 19 дней назад
You are such a LIVESAVER🫡
@DigitalFox-tutorials
@DigitalFox-tutorials 19 дней назад
Glad it helped
Далее
Avaz Oxun - 10 yillik yubiley konsert dasturi 2023
2:52:33
Send Email with PHPMailer from Localhost
24:17
Просмотров 14 тыс.
Send Email via SMTP Server in PHP using PHPMailer
11:05
How to Send Email Using PHPMailer in PHP
8:36
Просмотров 71 тыс.