How To Send Email Using PHP With PHP Mailer | PHP Send Email | Full Step By Step

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

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

  • @simas2313
    @simas2313 2 года назад +25

    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

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

      Glad to hear that! You're welcome, thanks for watching...

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

      Please, I am having the same problem. What changes did you make? How did you resolve it?

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

      @@abanwaraphael1526 same problem...plz help me

    • @su-cathy6156
      @su-cathy6156 9 месяцев назад

      ​@@hashmatmohammed5807😮

  • @msmalik6610
    @msmalik6610 Год назад +4

    Thanku so much u save my 3 4 days this video very helpful thank you so much 🥰🥰

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

      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!

  • @devshehan
    @devshehan Год назад +20

    Thank you . I were stucked whole night on my university project. Finally you saved me.

    • @DavidGTech
      @DavidGTech  Год назад +4

      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!

    • @jaadoo3591
      @jaadoo3591 7 месяцев назад

      what was your project

  • @AzaMan-c5h
    @AzaMan-c5h Месяц назад

    this is the best video ever when it comes to getting aid on php mailer , thanks alot , it worked

  • @vikramjha6829
    @vikramjha6829 Год назад +3

    This video helped me alot .

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

      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.

  • @rajpuri5109
    @rajpuri5109 4 месяца назад +1

    Thanks brother, it worked because of you.

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @rajpuri5109,
      Glad to hear that! 😊 Happy to help, and thanks for watching!

  • @vale-mg7ws
    @vale-mg7ws Год назад +2

    thank you ssoooooo mmmmuuuuuccchhhh!!!

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

      You're very welcome!!! Thanks for watching!!!

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

    Thank you. It is very helpful.

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

      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.

  • @mdmusaddique_cse7458
    @mdmusaddique_cse7458 Год назад +3

    Thanks a lot
    It was helpful!

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

      Glad it helped! You're welcome!!! Thanks for watching...

  • @HichemMansouri-m6u
    @HichemMansouri-m6u 8 месяцев назад

    I can't stop dancing with a music like that :'D ...and i can't work too...thx for this tuto

    • @DavidGTech
      @DavidGTech  8 месяцев назад

      🤣🤣🤣👍👍, you're welcome!

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

    Nice video
    👍 my texts are landing to the spam instead of inbox though.

    • @DavidGTech
      @DavidGTech  10 месяцев назад

      Thank you @denniskoome5319

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

    Please make more video like this sir

    • @DavidGTech
      @DavidGTech  10 месяцев назад +1

      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! 🚀😊

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

    Thank you!! was stack

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

      You're welcome!!! Thanks for watching.

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

    very helpful 👍

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

      Glad to hear that! Thanks for watching...

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

    Nice tut video bro, thanks

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

      Thank you so much for your kind words!

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

    Hello, thanks for This tutorial.
    But I got problem.
    After starting it in localhost, while sending mail I got error:
    Mailer Error: Message body empty
    What is wrong?

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

      Thank you for reaching out and I'm glad you found the tutorial helpful! Regarding the error message you received, "Mailer Error: Message body empty," it typically indicates that the email you're trying to send does not have any content in the body. Please ensure that you have specified the content of your email message properly. Make sure you have added the necessary text or HTML content to the body of the email.

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

      Thanks for answering! I figured it out now. I finished my webpage for exam. Thanks!

  • @php-frankgp
    @php-frankgp Год назад +2

    Thank 👍

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

      You're welcome!!! Thanks for watching.

  • @AISMOOTHIEPH99
    @AISMOOTHIEPH99 Месяц назад

    6:08 email port is the default number?

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

    👌👌👌

  • @N54-v8o
    @N54-v8o 7 месяцев назад +1

    Can you when i click on plce order it will automatically send on user account how to do this in php

    • @DavidGTech
      @DavidGTech  4 месяца назад

      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.

  • @AminulIslam-lw5jd
    @AminulIslam-lw5jd Год назад +1

    Can we add more field like phone number address or anything? Please solve this.

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

      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.

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

    Thank you so much!

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

      You're welcome! Thanks for watching...

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

    Bro what editor are you using?

  • @venkatakrishna8881
    @venkatakrishna8881 6 месяцев назад +1

    Thank you

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @venkatakrishna8881,
      You're welcome! 😊 Glad I could help!

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

    i have a problem about a turning on 2-step virification google remove this option in the laste update

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

      In the latest update, Google still have 2 step verification option

  • @natan.mendes
    @natan.mendes 10 месяцев назад +1

    thanks, i had an error but i solved it by inserting the following line:
    $mail->SMTPAuth = true;

    • @DavidGTech
      @DavidGTech  10 месяцев назад

      Thanks for sharing your solution! I'm glad to hear that you were able to resolve the issue by adding the line '$mail->SMTPAuth = true;'. It's awesome that you figured it out! If you have any more questions or if there's anything else you'd like to see in future videos, feel free to let me know. Happy coding!

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

    Broo thnkss a lot ! Can i change the message on my own in these ?

    • @DavidGTech
      @DavidGTech  10 месяцев назад

      Hey @sanjay3396,
      You're welcome! I'm glad you found the tutorial helpful. 😊 Absolutely, you can customize the email message to make it your own. In the PHP code, look for the part where the email body is set (usually using the Body or msgHTML method in PHPMailer).
      Feel free to modify the content within the quotation marks to tailor the message to your preferences. Make it as personal or professional as you need!
      If you have any questions while customizing the message or if there's anything else you'd like to learn, feel free to ask. Happy coding! 🚀

  • @justinarenas2826
    @justinarenas2826 6 месяцев назад +1

    hey how can I fix [404] /index.php - No such file or directory

    • @justinarenas2826
      @justinarenas2826 6 месяцев назад

      can anyone help me
      pls

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @justinarenas2826,
      A 404 error means the file or directory is not found. Make sure that index.php exists in the specified directory and that your web server is configured correctly. Double-check your file paths and ensure everything is correctly set up. Let me know if you need more help! 👍

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

    thanks man, love you

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

      You're welcome! Thanks for watching

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

    Thank you

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

      You're welcome!!! Thanks for watching...

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

    nice

  • @oussamafahd4205
    @oussamafahd4205 8 месяцев назад +1

    thank you

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

    Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in D:\wamp\www\sendmail\send.php on line 2 how I solve It?

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

      Write the codes properly like in the video, then it will works.
      Thanks for watching!

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

    works great

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

      I'm so glad to hear that!!! Thanks for watching!!! Keep up the good work!!!

  • @f.bfootballers8500
    @f.bfootballers8500 11 месяцев назад +1

    can any experienced programmer tell me that is this method secured

    • @DavidGTech
      @DavidGTech  10 месяцев назад

      Great question! Security is a crucial aspect when working with email functionality in PHP. In the video, I've demonstrated the usage of PHPMailer, a widely used library that helps in sending emails securely.
      To enhance the security of your email sending process, consider the following tips:
      - Sanitize Input Data: Always sanitize and validate user input to prevent potential security vulnerabilities like SQL injection or cross-site scripting.
      - Use SMTP Authentication: If possible, configure PHPMailer to use SMTP authentication instead of the mail() function. This adds an extra layer of security by authenticating with a mail server.
      - Secure Credentials: If you are using any sensitive information, such as email server credentials, make sure they are stored securely. Avoid hardcoding sensitive information directly in your code.
      Remember, security is an ongoing process, and it's crucial to stay informed about best practices. If you have specific concerns or questions about a particular aspect of the method, feel free to ask for more details. Additionally, always test your code thoroughly in a safe environment before deploying it to a production environment.

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

    This what main is showing
    Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 101 Additional SMTP info: Network is unreachable

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

      Thank you for reaching out and sharing the error message you encountered. The error message suggests that there was a problem connecting to the SMTP host/server used for sending emails. This issue could be due to various reasons, such as incorrect SMTP server settings, network connectivity issues, or firewall restrictions.
      To troubleshoot the problem, I recommend the following steps:
      - Double-check your SMTP server settings, including the host, port, username, and password. Ensure that they are accurate and match the configuration provided by your email service provider.
      - Verify your network connectivity. Ensure that you have a stable internet connection and that there are no network issues or restrictions that might be preventing the connection to the SMTP server.
      - Check if there are any firewall or security settings that might be blocking the connection to the SMTP server. Temporarily disabling any firewalls or security software can help determine if they are causing the issue.
      I hope this helps! Let me know if you have any further questions or need additional assistance.

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

      Thanks Boss

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

      You're very welcome!!!

    • @ChinthapatlaPranay
      @ChinthapatlaPranay 5 месяцев назад

      ​@@DavidGTech Thanks sir! you are my saviour

  • @Cleepy_
    @Cleepy_ 8 месяцев назад +1

    still is not working for me?

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @Cleepy_! Sorry to hear it's still not working for you. Make sure all your configurations are correct and check for any errors in your console or PHP logs. If you need more specific help, please provide details about the issue you're encountering.

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

    Thanks bruy

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

      You're welcome! Thanks for watching...

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

    why im getting this error SMTP Error: Could not authenticate.

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

      Thank you for reaching out! The error "SMTP Error: Could not authenticate" typically occurs when there is an issue with the authentication credentials used to connect to the SMTP server.
      Here are a few things you can check to troubleshoot this error:
      - Double-check your SMTP server settings: Ensure that you have entered the correct SMTP server address, port number, username, and password. These details are essential for successful authentication.
      - Verify your SMTP credentials: Make sure that the username and password you are using to authenticate with the SMTP server are correct. Check for any typos or errors in the credentials.
      - Confirm that your account has the necessary permissions: Some SMTP servers require you to enable specific settings or permissions for your account to send emails. Check the documentation or contact your email service provider to ensure that your account has the required permissions for sending emails through SMTP.
      - Check firewall or security settings: In some cases, firewalls or security software can interfere with the SMTP connection. Temporarily disabling any firewall or security software and testing the email sending process again can help identify if this is the cause.
      If you have tried the above steps and are still encountering the error, it might be helpful to provide more specific information about the code or library you are using to send emails. This way, I can provide more targeted assistance.
      Feel free to ask if you have any further questions or need additional help!

  • @niitpatole7744
    @niitpatole7744 9 месяцев назад +1

    Will be work on live server...?

  • @SeanMcCaffrey-fw9mf
    @SeanMcCaffrey-fw9mf 4 месяца назад +1

    Are you on Telegram bro ?

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @SeanMcCaffrey-fw9mf,
      I’m not on Telegram, but feel free to ask any questions here! 😊

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

    i cant find the app password in my account where do i find it

    • @DavidGTech
      @DavidGTech  10 месяцев назад +1

      Hi @FOUR_DE,
      No worries! To find the app password in your account, follow these general steps:
      Visit Account Security Settings: Log in to your email account and navigate to the account security or security settings section.
      App Password Section: Look for a section specifically related to app passwords or third-party applications. It might be labeled as "App Passwords," "Security," or something similar.
      Generate App Password: Once you're in the appropriate section, you should find an option to generate a new app password. Click on that option.
      Follow the Steps: The platform will likely guide you through a series of steps to generate the app password. Follow the instructions provided.
      Copy the App Password: After generating the app password, copy it. This is the password you'll use in your PHP code when configuring PHPMailer.
      Remember that the exact steps may vary based on your email provider (e.g., Gmail, Outlook), so if you're having trouble, you might want to check the help or support documentation for your specific email service.
      If you have any more questions or encounter difficulties, feel free to provide additional details, and I'll do my best to assist you!

    • @FOUR_DE
      @FOUR_DE 10 месяцев назад +1

      @@DavidGTech i finished the course and solved this problem 3 months ago😅 although thank u

    • @DavidGTech
      @DavidGTech  10 месяцев назад

      @@FOUR_DE Wow, great! You're very welcome!

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

    how do you know if something went wrong

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

      Great question! When sending emails using PHP Mailer, there are a few ways to determine if something went wrong during the email sending process. Here are a couple of methods:
      - Error Handling: PHP Mailer provides error handling mechanisms that allow you to capture and handle any errors that may occur during the email sending process. You can use try-catch blocks to catch any exceptions thrown by PHP Mailer and display or log the error message. This way, if something goes wrong, you can identify the issue and take appropriate action.
      - Return Values: PHP Mailer methods typically return boolean values to indicate the success or failure of an operation. For example, the send() method returns true if the email is sent successfully and false if there is an error. You can use these return values to check if the email sending process was successful or not.

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

      @@DavidGTech thank you so mush

  • @neoneo-m2u
    @neoneo-m2u Год назад

    this is not working

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

      I'm sorry to hear that you're having trouble with the tutorial. Let's work together to figure out what might be going wrong. Could you please provide more details about the issue you're facing? That way, I'll be able to assist you better and help you get the email sending functionality up and running. Don't hesitate to ask for help, and we'll get this sorted out!

  • @ismailrukan
    @ismailrukan Год назад +18

    Finally, Email has been sent Successfully.

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

      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!

  • @bohdanreshe7484
    @bohdanreshe7484 Год назад +11

    Thank you, David!
    Still helpful
    I have solved my task
    Subscribed!

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

      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.

  • @SandeepThaliyil
    @SandeepThaliyil Год назад +7

    Thanks man. Your video helped me configure phpmailer.🙂

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

      You're welcome! Thanks for watching...

  • @Apricot0034
    @Apricot0034 Год назад +10

    Thanks man, thanks to this video I solved the error and saved my sanity!

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

      You're welcome! Thanks for watching...

  • @blockedrt3
    @blockedrt3 Год назад +9

    Thank you 😭 you have just saved me from myself

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

      You're welcome!!! Thanks for watching.

  • @himajpatil
    @himajpatil Год назад +4

    Love youu guy______this video helped me a lot after trying for 2hours finally happenned in two minutes

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

      Glad to hear that! Thanks for watching...

  • @daniallo1375
    @daniallo1375 Год назад +4

    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

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

      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!

  • @hawkingT
    @hawkingT Месяц назад +1

    u seriously want us to purchase this code 😒😒

  • @roylopez6892
    @roylopez6892 2 года назад +6

    Thank you very much, it helps a lot with my project.😀😀😀

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

      You're welcome!!! Thanks for watching...

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

    ka saya udah coba sesuai tutorial pas send ngga ada error tapi ngga terkirim emailnya dan pass di send.php bagian use PHPMailer\PHPMailer\Exception; warnanya ngga muncul apa karena itu yah? mohon bantuannya, makasih ka

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

      Kalau misalnya gak kekirim, coba di cek lagi di bagian spam gmailnya, terus pastiin kodenya gak ada salah penulisan, dan yang paling penting pas bagian setting SMTP server jangan ada yang salah ya, thank you!

  • @minasamaan1208
    @minasamaan1208 Год назад +4

    Thanks a lot after trying 4 days hardly with many researches to to send the email I did it successfully thanks to you.

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

      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.

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

    3 gruelling hours of debugging and head-scratching and finally this tutorial woks

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

    thank bro it working but how can send email to other email account? tia

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

      Just write gmail account name in email input

  • @foxynight1688
    @foxynight1688 Год назад +6

    Thank you so much for this video it really helpful for me to finish my project assignment!!!🙏🙏

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

      Did it work with Gmail?

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

      ​@@srabonxYes

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

      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!

  • @김준혁-z3n
    @김준혁-z3n 2 года назад +5

    아 너무 감사합니다 !!! So~~~~~ Thanks You !!!

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

      You're welcome!!! Thank you for watching my video...

  • @caronpereira6918
    @caronpereira6918 2 месяца назад +1

    Thank you so much for this! Was stuck with this issue for a long time. Really grateful! God bless and do make more helpful videos such as this. Subscribed!

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

    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

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

      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

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

      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.

  • @zaynebuere
    @zaynebuere Год назад +6

    Thank you so much, you save my team sir 🤗

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

      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.

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

    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!!!!

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

      I got the same problem, do you have a solution?

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

      @@de48brinformatique52 Check your interrnet connection.

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

      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.

  • @Alberto-ji9ql
    @Alberto-ji9ql Год назад +1

    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

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

      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.

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

    Hello David G tech having error messages after I have followed your tutorial, I tried testing it and when I click the send button. it pops out this on my screen. Fatal error: Uncaught PHPMailer\PHPMailer\Exception: SMTP Error: Could not authenticate. in C:\xampp\htdocs\sendmail\PHPMailer\src\PHPMailer.php:2212 Stack trace: #0 C:\xampp\htdocs\sendmail\PHPMailer\src\PHPMailer.php(2019): PHPMailer\PHPMailer\PHPMailer->smtpConnect(Array) #1 C:\xampp\htdocs\sendmail\PHPMailer\src\PHPMailer.php(1678): PHPMailer\PHPMailer\PHPMailer->smtpSend('Date: Mon, 30 J...', 'hello boy
    ') #2 C:\xampp\htdocs\sendmail\PHPMailer\src\PHPMailer.php(1516): PHPMailer\PHPMailer\PHPMailer->postSend() #3 C:\xampp\htdocs\sendmail\send.php(29): PHPMailer\PHPMailer\PHPMailer->send() #4 {main} thrown in C:\xampp\htdocs\sendmail\PHPMailer\src\PHPMailer.php on line 2212
    Im goanna leave a mail for you with my name chuks mgbaja
    Please can you help me figure out these issues thanks

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

      Did your error got resolved ?

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

      Hi Chuks,
      Thank you for reaching out and providing the error message you are receiving. Based on the error message, it seems like there may be an issue with SMTP authentication.
      To troubleshoot this issue, you can try the following:
      Make sure that your email provider's SMTP settings are correct and that you have entered them correctly in your code.
      Double-check that you have entered the correct username and password for your email account.
      Try using a different email account to see if the issue is specific to the account you are currently using.
      Check if there are any firewall or antivirus programs that may be blocking the SMTP connection.
      If none of these solutions work, please let me know and we can explore other options.
      Best,
      David G tech

  • @mikiyasgetnet2419
    @mikiyasgetnet2419 Год назад +6

    Thank you, sir!!! it really helps!

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

      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!

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

    subscribed! will watch every video from now on!

  • @dominikpiszczek7062
    @dominikpiszczek7062 Год назад +5

    Simple, fast, with every step needed. Just great. Thank you!

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

      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!

    • @naturelife9647
      @naturelife9647 10 месяцев назад

      ​@@DavidGTechClass PHPMailer not found

  • @YashSingh-ym4yi
    @YashSingh-ym4yi Год назад +2

    owesome i have the fear of this code but i have done .. thank you sir .. you resolve my problem

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

      Glad to hear that!!! You're very welcome!!! Thank you for watching!!!

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

    Hey guy
    Thank u so much, its perfectly work
    Now how can I design my email message body (template)

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

      You're welcome! Thanks for watching...

  • @pavlusa
    @pavlusa Год назад +5

    Very cool info thank you ... subscribed🙂

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

      You're welcome! Thanks for watching and subscribe...

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

      @@DavidGTech I happy to found info like these .. , thanks for that.

  • @CanalJIT
    @CanalJIT 6 месяцев назад +3

    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.

    • @muchSwagcom
      @muchSwagcom 4 месяца назад

      How the App Passwords in the google account is missing

    • @DavidGTech
      @DavidGTech  4 месяца назад

      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. 👍

    • @DavidGTech
      @DavidGTech  4 месяца назад +1

      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! 😊

  • @halimal7510
    @halimal7510 6 месяцев назад +1

    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?

    • @DavidGTech
      @DavidGTech  4 месяца назад

      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! 😊

  • @gokulgokul7523
    @gokulgokul7523 5 месяцев назад +2

    this video saved my job thankyou bro

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @gokulgokul7523,
      I'm so glad to hear that! 😊 Thank you for letting me know, and I'm happy I could help!

  • @claucastro8381
    @claucastro8381 Год назад +3

    Thank you! I was struggling to get this working for 2-3 hours before I stumbled upon your video.

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

      Great! You're welcome.. Thanks for watching!!

  • @mr.chavda636
    @mr.chavda636 28 дней назад

    I have a issue in my PHP- code with email verification can anyone help me???

  • @sameerasmr6217
    @sameerasmr6217 Год назад +3

    Very good I hope you are from software engineering degree 👍🙏

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

      Yes, I am. Thank you for watching!

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

    email is working but i haven't received any email i need some help please

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

      Maybe you should check in your spam email or that your codes that aren't fully correct

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

      @@DavidGTech its all working i resolved it within the day i commented it . I just forgot to reply to my comment hahha by the way thanks for the tutorial.

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

      I'm so glad to see this your reply. You're welcome! Thanks for watching...

  • @CodePraiseGod-oj9ig
    @CodePraiseGod-oj9ig 7 месяцев назад +2

    thank you, i have been finding suitable video for many days

    • @DavidGTech
      @DavidGTech  4 месяца назад

      @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!

  • @ErtuğrulSefaTaşdemir
    @ErtuğrulSefaTaşdemir 7 месяцев назад +1

    Hello sir,
    i want to ask a question.
    I want to do a form,people fill the form and send it to me without their email,i want to use my other email for all messages.I mean when they send the message the message come to me from my other email.Is it possible? and sorry for my bad english,
    Thanks from now.

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @user-cc2tr7xs9f,
      Yes, it's possible to set the "From" email address to your other email address when sending messages from a form. You can do this using PHPMailer or the mail() function in PHP. Here's an example using PHPMailer:
      $mail->setFrom('yourotheremail@example.com', 'Your Name');
      Replace 'yourotheremail@example.com' with your other email address.

  • @yinkang
    @yinkang 8 месяцев назад +1

    Warning: require(PHPMailer/src/Exception.php): Failed to open stream
    How to solve this problem?

    • @DavidGTech
      @DavidGTech  4 месяца назад

      Hi @yinkang! To solve the "Failed to open stream" error, ensure that the PHPMailer files are correctly included in your project. Check the file path for Exception.php and make sure it matches the directory structure in your project.

  • @samuelnicholas9694
    @samuelnicholas9694 10 месяцев назад +2

    Thank you for the video, wish you all the best

  • @Swamydhas-ri1dg
    @Swamydhas-ri1dg 3 месяца назад +1

    App password is not showing me

    • @remofiloephokontsi8538
      @remofiloephokontsi8538 3 месяца назад

      It's showing I've done it.... it's just hiding search it at your Google account

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

    Generated app password not fond in my email ?? What solutions??

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

      There are a few things you can try:
      - Check your spam folder in Gmail: The generated email may have been flagged as spam by your email provider and redirected to your spam folder.
      - Check your email settings: Make sure that your email settings are configured correctly to receive emails, and that any filters or rules you have set up are not preventing the email from being delivered.

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

      @@DavidGTech Thank you. I have found the problem. I have changed the settings for taking a code from the email. I would like the same method for Outlook Is it possible, if possible ?

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

    thank u sir l have solved my task

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

      Great!!! You're very welcome!!! Thanks for watching!!!

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

    it works wow. it only appears in the spam

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

      Thank you for trying out the tutorial, and I'm glad to hear that it worked for you! The email ending up in the spam folder is a common issue, and there are a few things you can do to improve email deliverability:
      - Email Content: Ensure that your email content is relevant, well-structured, and doesn't contain any suspicious links or attachments. Avoid using too many spam trigger words.
      - SPF & DKIM: Set up SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) records for your domain. These authentication methods can help prove the authenticity of your emails.
      - Dedicated IP Address: If you're sending a large volume of emails, consider using a dedicated IP address. Shared IP addresses may be associated with others who send spam.
      - Clean Email List: Maintain a clean email list by regularly removing inactive or invalid email addresses. High bounce rates can negatively impact deliverability.
      - Double Opt-in: Implement a double opt-in process to confirm the subscriber's consent and reduce the chances of spam complaints.
      Remember that email providers have sophisticated algorithms to detect spam, so even legitimate emails can sometimes end up in spam folders. Encouraging your subscribers to mark your emails as "Not Spam" can help improve deliverability over time.
      If you have any other questions or need further assistance, feel free to ask. Happy emailing!

  • @jonathanbenaya5078
    @jonathanbenaya5078 Год назад +5

    good video, very educative

  • @nitheesha2298
    @nitheesha2298 Год назад +3

    Thank u so much ,finally made it🤗

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

      You're welcome! Thanks for watching.

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

    thank You very much

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

      You are welcome!! Thanks for watching!!!

  • @daniel_youtubechannel8717
    @daniel_youtubechannel8717 Год назад +3

    I don't know how to thank You. you've done a great work for me.

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

      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.

    • @samuelnicholas9694
      @samuelnicholas9694 10 месяцев назад

      ​@@DavidGTech❤❤

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

    ty mai fren, new suscraiber and one mor like.

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

      You're welcome!!! Thanks for watching...

  • @muhammadbabar9836
    @muhammadbabar9836 8 месяцев назад +1

    How to add multiple addresses? Can add that email which is not associate with actaual email and Pass?

    • @DavidGTech
      @DavidGTech  4 месяца назад

      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.

  • @JoshuaIanCadiz
    @JoshuaIanCadiz 10 месяцев назад +1

    Can I use this function in CTA from landing pages? Is it safe and secure?

    • @DavidGTech
      @DavidGTech  10 месяцев назад

      Hi @user-nk3of8he7d ,
      Great question! Yes, you can use a PHP email function, like PHPMailer, in a call-to-action (CTA) from landing pages. It's a common practice to utilize server-side scripting for handling form submissions, including email sending.
      Regarding safety and security:
      - Data Validation: Always validate and sanitize user input on the server-side to prevent malicious activities. PHPMailer itself is a secure library, but how you handle user input is crucial.
      - Avoiding Injection: Guard against email header injections by validating and cleaning the input before using it in the email. PHPMailer helps prevent this, but proper validation adds an extra layer of security.
      - SPAM Protection: Implement CAPTCHA or other anti-bot mechanisms to reduce the risk of abuse.
      - SSL/TLS: If you're sending emails via SMTP, ensure that you're using a secure connection (SSL/TLS) for added security.
      Remember, security is a shared responsibility between your PHP code, server settings, and how you handle user input.
      Feel free to tailor your security measures based on your specific use case and, if needed, share more details for more personalized guidance.

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

    You send the email to yourself
    How about sending message using user's email?

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

      In this video, it's not about sending an email to myself, but rather about sending an email to someone by simply inputting their email and your message. After you click 'submit,' your message will be sent to them

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

    So cool bro!!!! please add Attach file bro

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

      Later, thanks for watching...

  • @coosajo1
    @coosajo1 Год назад +3

    thanks for this

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

      You're welcome! Thanks for watching...

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

    please sir make video on live server because this method not working mail is goes in spam please give solution for it

  • @angelaboniface-u3v
    @angelaboniface-u3v Год назад +2

    thank you Subscribed!

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

      You're welcome! Thanks a lot!!!

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

    You are legend for sure thanks mate ! God bless you

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

      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 ruclips.net/video/l8R7O4zckj8/видео.html, hope this video can help you more!!

  • @akindelesamuelkehinde6817
    @akindelesamuelkehinde6817 8 месяцев назад +2

    you solved my problem thanks

    • @DavidGTech
      @DavidGTech  8 месяцев назад +2

      You're very welcome!