How to Send Email Using PHPMailer (2022) & Gmail SMTP

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 281

  • @djong3775
    @djong3775 2 года назад +5

    the gmail setting had changed to other method and my smtp is not working at all. ..something is blocking it to transfer email . i had test through the online gmass smtp test but it still blocking...
    im not sure what to do...

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  2 года назад +1

      Please follow my new video to solve this problem:
      ruclips.net/video/mte7LroYd74/видео.html

  • @learntoearn4658
    @learntoearn4658 2 года назад +2

    Finally i am now able to add contact us form with email notification in my any website project. Thanks sir. Thanks for quality content.

  • @jaxonrox
    @jaxonrox Год назад +2

    Fantatically demonstrated. Just how any tutorial should be.

  • @GuitarsRgood7
    @GuitarsRgood7 4 года назад +2

    I spent like 2 hours watching other videos yesterday and none worked for me. But your video worked!!! Thank you so much!

  • @redamg2789
    @redamg2789 2 года назад +1

    ur the only one that remind us about allowing acces on gmail

  • @jasonmich1805
    @jasonmich1805 4 года назад +8

    OMG thank you very very much for taking the time to make this video and going over each step and explaining the way you did! You helped me tremendously and for that you earned my "Like" on this video and a Sub!!! You're awesome!

  • @greywanderer8659
    @greywanderer8659 3 года назад +6

    Finally a video that actually worked!!!!

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад +2

      Happy to help you guys.. pls subscribe for more stuff like this..

  • @coderslife9732
    @coderslife9732 Год назад +1

    Thanks a lot sir for giving this video for student like me I am too happy to use this and thankyou

  • @findxng
    @findxng 2 года назад +4

    I can't thank you enough... This is a great tutorial. I love the way you itemized with comments before solving step-by-step

  • @aariskazi9002
    @aariskazi9002 4 года назад +2

    Thanks, bro I have been tried so many times to overcome this problem but after I watch your video it helps me instantaneously

  • @hacene5447
    @hacene5447 2 года назад +1

    Finally I did it / the problem was on the mail adress If you could not execute this program try to create an new compte gmail and re-execute it

  • @seetharamankirubakaran8770
    @seetharamankirubakaran8770 3 года назад +2

    Thanks so much bro!! I spent 3 days of time of spending these functions!! It's working!!! Glad to thanks so much bro!!!!

  • @officeshongkong451
    @officeshongkong451 3 года назад +2

    it worked! Thank you! Finally, I have something that works! Fantastic!

  • @smartbeeinc
    @smartbeeinc Год назад +1

    man is a great teacher.. thank you!

  • @TheCause41
    @TheCause41 2 года назад +2

    I can't thank you enough. I have one question, how would you go about adding this to a Wordpress website? If anyone has any ideas please let me know!

  • @nathanaelmeshesha4557
    @nathanaelmeshesha4557 2 года назад +1

    OH MY GOD, thank you so much been trying to get this working all day!

  • @alexandrcoreov8584
    @alexandrcoreov8584 4 года назад +5

    Thanks, Bro ! ))
    I ` ve spent 3 hours to find a solution how to fix errors.
    After video - it took me for a 5 minutes.. :D

  • @azerchniti9497
    @azerchniti9497 Год назад +1

    thank you very much this is very helpful this method works 100%

  • @loaihassan567
    @loaihassan567 4 года назад +3

    Thanks, Bro ! ))
    I ` ve spent 5 hours to find a solution how to fix errors.

    • @vipin2356
      @vipin2356 4 года назад

      Bro plz tell me that what was the error... And what was the solution

  • @j8acob1
    @j8acob1 2 года назад +1

    Thank you so much! My website contact form stopped working after I switched hosting services. Its now up and running again.

  • @TechDevTips
    @TechDevTips 3 года назад +1

    Thanks so much…!!! You save my project. I am new student.

  • @dn.wickramasinhe
    @dn.wickramasinhe 3 года назад +1

    Amazing.... It worked! I was looking for this 2 days. Thank you soooo much.

  • @mariaalizalomugdang914
    @mariaalizalomugdang914 3 года назад +1

    OMG! THANK GOD! THANK YOU SO MUCH!

  • @kriziacarissepangan1590
    @kriziacarissepangan1590 2 года назад +1

    Thank you so much sir!!! New subscriber here! Moreee! God bless!

  • @mohammedaliidrisi9045
    @mohammedaliidrisi9045 3 года назад +1

    thats a good exlanantion thanks u r life saver

  • @TheNancyGroove
    @TheNancyGroove 2 года назад +1

    I did it, thank you so much for your lesson! I need to implement the updated phpmailer on my website, the phpmailer that is on it is very old, can you help me?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  2 года назад

      Thanks for your comment pls send email at admin@broexperts.com .. I will try to help as much as I can.. Thanks

  • @sohelakther714
    @sohelakther714 3 года назад +1

    Really you are Boss. Thanks for this important video.

  • @ranaivomananatoussaint8434
    @ranaivomananatoussaint8434 4 года назад +1

    Thank You for this tutorial
    I can understand the sequential method for sending an email with php

  • @tk0014
    @tk0014 3 года назад +1

    Ohhh THANK YOU So Much !!!! it works :)

  • @gamalabdelrahman769
    @gamalabdelrahman769 4 года назад +1

    Oh My God .. Finally I Found A Way To Send An Email With PHPMailer Thanks To You .... I Want Thank You So Much For Your Effort ; Best Regards

  • @indrajitsarkar4994
    @indrajitsarkar4994 4 года назад +2

    THANK YO BROTHER! THANKS A LOT. IT WORKED FINE FOR ME.

  • @nhiduong1488
    @nhiduong1488 4 года назад +2

    thank you! I've tried some tutorials but my mail was not sent until yours!

  • @MOHAMED-AMINE-CHEKROUNI
    @MOHAMED-AMINE-CHEKROUNI 4 года назад +2

    thank you, this video helped me a lot, Thanks

  • @ioulios12
    @ioulios12 2 года назад

    THANL YOU!

  • @critbyte
    @critbyte 3 года назад +1

    thank you for the video, and yes... I will subscribe.

  • @TheJvorte
    @TheJvorte 3 года назад +2

    Great video , thanks a lot!!!

  • @carolinemagunde2022
    @carolinemagunde2022 4 года назад +2

    Thanks for the detailed explanation

  • @kiranraut9380
    @kiranraut9380 4 года назад +1

    Very useful video for mailing configuration.

  • @Wjdveiwlslfbeb
    @Wjdveiwlslfbeb 3 года назад +2

    simple and clear explanation! thank you so much!

  • @kothakapusriharshini5636
    @kothakapusriharshini5636 2 года назад +1

    Very useful....Thank you!!!!!!!!!!!!

  • @rahulbiju4189
    @rahulbiju4189 2 года назад +1

    thank you so much

  • @kribo9604
    @kribo9604 2 года назад +1

    Greate vid but put it into a docker container and then how does it sen d then???

  • @ibadinmeshach5327
    @ibadinmeshach5327 2 года назад +1

    Thank u sir

  • @fegadesir742
    @fegadesir742 3 года назад +1

    Thank you so much! Works perfect for me

  • @nolocastro3683
    @nolocastro3683 4 года назад +1

    great video, many thanks!!!👊

  • @ianlopez1480
    @ianlopez1480 2 года назад +1

    Bro, do you have another tutorial like this? That the message, subject and recipient will be entered in the index.php?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  2 года назад +1

      Thanks for your message.. Will make better version of this video including taking email text from form..

    • @ianlopez1480
      @ianlopez1480 2 года назад

      @@BroExperts-Tutorials Thanks bro. Looking forward in it :)

  • @pearl7970
    @pearl7970 3 года назад +5

    Thankyou , and if I want to attach a value in The database sends it as $row['id_booking']; in $mail->Body, what should I do?

    • @hafizhaider2960
      @hafizhaider2960 3 года назад +2

      You can pull record from the database and save in variable then echo that variable in email body.. that's simple.

  • @pasinduekanayaka8023
    @pasinduekanayaka8023 2 года назад +1

    do you have to do any changes for the php.ini file? or will it work without any changes?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  2 года назад +1

      It worked without any changes with default installation of xamp

  • @Hakimo-UK-Babeker
    @Hakimo-UK-Babeker 3 года назад +1

    well done mate! i really appreciate that

  • @TheTriangle444
    @TheTriangle444 2 года назад +1

    Hello. I dont need composer for this one in my live server if I just wanna send verification emails right?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  2 года назад

      You can use this code to send any email just call this function and add email content inside email body

  • @gustavoiglesias5843
    @gustavoiglesias5843 4 года назад +1

    Thank you so much! Works perfect for me :)

  • @Atti.Rehman
    @Atti.Rehman 3 года назад +1

    Good Work!

  • @Alisha-fk5kg
    @Alisha-fk5kg 3 года назад +1

    Thank you so much 😊

  • @runningsolution6154
    @runningsolution6154 4 года назад +1

    Thank you for your video.

  • @lanyiming
    @lanyiming Год назад

    Hello sir
    I watched your video and tried to install PHPMailer successfully. PHPMailer can work normally on the website set up by XAMPP on the local computer, but PHPMailer cannot work normally when the webpage is uploaded to the PHP website environment on synology , have you ever encountered this problem?

  • @matheuscosta8926
    @matheuscosta8926 4 года назад +5

    use PHPMailer\PHPMailer\PHPMailer;

    • @shadestorm3995
      @shadestorm3995 3 года назад

      i guess thats for using the class

    • @vinhlehuu2976
      @vinhlehuu2976 3 года назад

      i have a error : unexcepted token 'use' , can you help me to fix , thanks !

  • @skeeterstudies8109
    @skeeterstudies8109 2 года назад +2

    Bro please bulk email using php mailer

  • @jorgecano9813
    @jorgecano9813 2 года назад +1

    Thanks

  • @p_akp
    @p_akp 3 года назад +2

    Its show fat error
    Required () failed to open required 1
    And warning:
    Required () failed to open stream no such file in directory
    How I fix now🙄

  • @العرندس-ع8ل
    @العرندس-ع8ل 3 года назад

    nice .. How i can retrive all gmail account using PHP & how i can delete chosen emails ?

  • @pehankpayorouwesley3002
    @pehankpayorouwesley3002 2 года назад +1

    Gooooooooooooooooooooooooooooooooooooooooooooooooooooood

  • @elliotfriesen6820
    @elliotfriesen6820 3 года назад +1

    THANK YOU!

  • @arielguatta6327
    @arielguatta6327 3 года назад +1

    Now I'm just getting "error" printed out, but no other message, and no idea why it isn't working. Do you have any idea how to fix? This worked for me before..would appreciate any help you can offer.

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад

      You need to enable debugging mode to see what's wrong with your code..

  • @LakhaniDivyesh
    @LakhaniDivyesh 3 года назад +1

    thank bhai it's work

  • @nuysanbard2321
    @nuysanbard2321 2 года назад +1

    thank u

  • @bogia7562
    @bogia7562 4 года назад +1

    good example for beginner like me

  • @bilalgujjar2627
    @bilalgujjar2627 5 лет назад +1

    Great video!!

  • @officeshongkong451
    @officeshongkong451 3 года назад +1

    In this example, we can only send one email to one recipient. Is it possible to send more than one recipients? pls advise. Thank you.

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад +1

      Yes it is possible .. you need to add all recipients in an array and then using loop you can send emails to all one by one..

  • @mohamedaberkane2044
    @mohamedaberkane2044 4 года назад +1

    THANKS A LOT MAN

  • @vipin2356
    @vipin2356 4 года назад +4

    Sir i follow all the steps correctly but still the else block is running that echo "error" ..... Sir plz help me😭😭😭😭

  • @angelosampang
    @angelosampang 2 года назад +1

    Hello is phpmailer is gonna work in web hosted sites?

  • @nics5706
    @nics5706 2 года назад +1

    I just want to ask. If it happened that the plain text email was not sent even after following every step. What could be the reason?

  • @pakistaninsaudi
    @pakistaninsaudi Год назад

    السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
    brother setfrom should be the same as the username on which we are using smtp authantication?

  • @jasser4594
    @jasser4594 Год назад +1

    thanks

  • @cautionbaby8961
    @cautionbaby8961 3 года назад +1

    Sir base on my understanding you just need your gmail account for the phpmailer? Because some other tutorials that I watch they used SMTP2GO its free but you need a business email. How about gmail sir? And how many email can I send using gmail? And can I also send emails to other gmail account? Help sir I want to use phpmailer for practice purposes

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад

      Hi. Gmail has daily limit of 2000 emails.

    • @cautionbaby8961
      @cautionbaby8961 3 года назад

      @@BroExperts-Tutorials Thank you sir! Does it work if I hosted my website?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад

      Yes.. you can upload phpmailer file on your hosting server and send emails..

    • @cautionbaby8961
      @cautionbaby8961 3 года назад +1

      @@BroExperts-Tutorials Okay thanks because some had problems in the forum I read.

  • @جمعيهإقليميالبيئةوالتمنية

    Danke 🙏 für 👍🏽👍🏽

  • @athirajishnu1341
    @athirajishnu1341 Год назад +1

    Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\phpmailer\index.php on line 51 .....................How to solve this issue

  • @angelosampang
    @angelosampang 2 года назад +1

    Is this gonna work if I apply it in a web hosted website?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  2 года назад +1

      Yes definitely.. you can submit form data into phpmailer library and call send function to send email..
      But gmail settings are not same as shown in video.. I am making updated video on this.. subscribe our channel so you can get latest video.. Thanks

    • @angelosampang
      @angelosampang 2 года назад +1

      @@BroExperts-Tutorials Thanks bro this helped me a lot

  • @sachithharshamal3895
    @sachithharshamal3895 4 года назад

    Cool it's working bro! Thanks lot!

  • @molestando
    @molestando 4 года назад

    It worked for me, thanks. I would like to know if it is possible to make gmail in safe mode, or in other words, make our app safe for gmail, so we do not modify that configuration. Another thing that I would like to know is if it is possible to encrypt or make something more secure the authentication part with the password. Thank you!

  • @DavidAshby1
    @DavidAshby1 3 года назад +1

    How would you go about implementing this now so that rather than hardcoding the subject and destination, you used a normal form on a localhost webpage?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад +1

      There can be different type of implementations of PHPMailer .. depends on someone requirements.. you can take Subject and destination by input field or pull from database.. its all depends what type of stuff you working on..

    • @DavidAshby1
      @DavidAshby1 3 года назад +1

      @@BroExperts-Tutorials I am looking at a basic contact form and will see if I can substitute some of the code you gave in the tutorial for the variables from the $_POST. Thanks for getting back to me.

  • @jefersonborras2448
    @jefersonborras2448 2 года назад +1

    The “use” function is not working

  • @KegsProduction
    @KegsProduction 3 года назад

    im having an error it says: Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\Inventoryv2\email.php on line 51

  • @novailoveyou
    @novailoveyou 3 года назад

    Thank you bro!

  • @HenryWatters
    @HenryWatters 3 года назад

    it worked only once after which it displays error. Can you help? illegal string offset 'smtp connect() failed

  • @ALBDev
    @ALBDev 3 года назад +1

    I got error. Can you help me how to fix it?
    I turned on less secure apps option.

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад

      What error you are getting?

    • @ALBDev
      @ALBDev 3 года назад

      @@BroExperts-Tutorials I mean instead of getting "Mail Sent Successfully...!" I'm getting "Error...!" and I'm not receiving any mail.
      Hope you undestand what's going on???

  • @jmvalencia3378
    @jmvalencia3378 3 года назад +1

    I follow this video step by step but the end it said "error"
    I'm a first timer.
    I used Xampp
    Atom
    Notepad ++
    I did all the step but says error
    What do I need to do.
    Do I need to install something that I don't know

  • @soniaosman
    @soniaosman 4 года назад +1

    God Blessed you!

  • @luke98123
    @luke98123 4 года назад +1

    thank you !

  • @blackholefalling4802
    @blackholefalling4802 4 года назад +1

    Would this work on Mac OS X?

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  4 года назад +1

      Yes

    • @blackholefalling4802
      @blackholefalling4802 4 года назад +2

      @@BroExperts-Tutorials THANK YOU SO MUCH!!!!!!!!!!!(It worked). For Mac OS X users, go to your Mamp httdocs folder is this path "/Applications/MAMP/htdocs".

  • @yaseenimuhammadraja9461
    @yaseenimuhammadraja9461 3 года назад +1

    Can add toggle button for hiding and showing html table within mail body using phpmailer???
    Or any another way

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад

      Using javadcript you can hide elements..

    • @yaseenimuhammadraja9461
      @yaseenimuhammadraja9461 3 года назад

      @@BroExperts-Tutorials can't use js code in to phpmailer

    • @yaseenimuhammadraja9461
      @yaseenimuhammadraja9461 3 года назад

      @@BroExperts-Tutorials Yes. I already try it.
      I assigned html structure code and js code into one variable and assigned that variable to $mail->body= variable
      But it's not working 😔

  • @amitkush3116
    @amitkush3116 4 года назад +1

    I have tried thae same way but i am working on web template, if i delete the footer then it is working if i add the footer part again it does not work. Pls advise

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  4 года назад

      Thanks for your comment.. In my code there is no footer involved.. U need to check your footer code u might be having some error or break code when u add or remove footer..

  • @tamilkids9108
    @tamilkids9108 Год назад

    Iam just Try this one .... but inthis case sender and receiver both are same ... why ... that you can see in mail

  • @mauriciomedinasierra1069
    @mauriciomedinasierra1069 3 года назад

    gracias amigo muy util

  • @donwolfman
    @donwolfman 3 года назад +1

    When I follow same as in video and launched in browser it says syntax error in $mail line 31. And that is the body section. Please I need help with this. Trying to send bulk emails at once.

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад +1

      Hi.. pls carefully check your code .. there must be some error on line 31.. or paste your code here..

    • @donwolfman
      @donwolfman 3 года назад

      Below is the code you asked me to send here.

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад

      The way you are trying to add multiple recipients is wrong.. you need to define an array and loop them to send mulptiple emails.

  • @shatirdimag1011
    @shatirdimag1011 3 года назад +1

    Can this code be used to send otp on Gmail with php mailer

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  3 года назад

      This code will send email you can add anything in email body even OTP.. Thanks

  • @hjohirul
    @hjohirul 4 года назад

    Thank you so much for your video.
    I have an issue
    it says
    PHP Parse error: syntax error, unexpected '$mail' (T_VARIABLE)
    Could you please let me know the solution and why this is happening.

    • @kenzasouabni
      @kenzasouabni 2 года назад

      ça manque un ; quelque part

  • @mirtwomirtwo6810
    @mirtwomirtwo6810 Год назад +1

    Now google doesn't support third-party access how can I turn it on

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  Год назад

      Yes you are right.. pls check my new video on this topic.. Thanks
      ruclips.net/video/mte7LroYd74/видео.html

  • @shadestorm3995
    @shadestorm3995 3 года назад

    just perfect..

  • @abulalalalalaabulala4521
    @abulalalalalaabulala4521 2 года назад +1

    Does phpmailer have any requirementa for the sender account? I keep sending failed, please help me

    • @BroExperts-Tutorials
      @BroExperts-Tutorials  2 года назад

      It doesn't have any requirements for sender..should be email ..

    • @abulalalalalaabulala4521
      @abulalalalalaabulala4521 2 года назад

      @@BroExperts-Tutorials For the same mailbox, I was able to do nothing before and then I didn’t do anything. After that, he can’t. What could be the reason?