How to send Email Using PHPMailer and Gmail SMTP - in live Hosting server or Website

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2023
  • 📧 Sending Email with PHPMailer and Gmail SMTP - Live Hosting Tutorial
    👉 Introduction:
    In this step-by-step tutorial, we'll guide you through the process of sending emails using PHPMailer and Gmail SMTP on a live hosting server or website. This powerful combination ensures reliable and secure email delivery for your PHP-based projects.
    🔗 Resources:
    PHPMailer GitHub Repository :
    github.com/PHPMailer/PHPMaile...
    📋 Key Steps Covered:
    Download and Include PHPMailer:
    Learn how to download PHPMailer and include it in your PHP project.
    Create a Gmail Account:
    If you don't have one already, create a Gmail account. We'll guide you through essential security settings.
    Generate Gmail App Password:
    Set up an App Password for secure SMTP authentication. This is crucial for sending emails from your web application.
    Configure PHPMailer with Gmail SMTP:
    Understand the PHP code to configure PHPMailer with Gmail SMTP, ensuring a seamless connection.
    Write and Send Your First Email:
    Dive into the practical aspect by writing a simple PHP script to send your first email using PHPMailer and Gmail SMTP.
    Testing on Live Hosting:
    Witness the entire process in action on a live hosting server or website, ensuring that your emails are successfully sent.
    💡 Pro Tips:
    Troubleshooting common issues.
    Best practices for email content and formatting.
    🤔 Questions or Feedback?
    If you have any questions or would like to share your experience, feel free to leave a comment below. We're here to help!
    👍 Like, Share, and Subscribe for More:
    If you find this tutorial helpful, give it a thumbs up, share it with fellow developers, and subscribe for more insightful content.
    🔔 Stay Connected:
    For the latest updates and more tutorials, follow us on social media:
    discoverabhi.com
    🙏 Thanks for Watching!
    #PHPMailer #GmailSMTP #EmailSending #WebDevelopment #Tutorial #LiveHosting
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 32

  • @mutlumertcan
    @mutlumertcan 6 หลายเดือนก่อน +2

    God bless you, my friend. You solved what I have been trying to do for how many hours. and there is really no updated video about it. really thank you very very much. i love Indian software developers very much. i find the solution of every problem in you. greetings from turkey. .

    • @discoverAll
      @discoverAll  6 หลายเดือนก่อน +1

      thanks bro ..

  • @hectorclark4012
    @hectorclark4012 18 วันที่ผ่านมา

    Thankyou very much my friend!!! You've saved me!!!

    • @discoverAll
      @discoverAll  18 วันที่ผ่านมา

      Glad I could help!

  • @hugo3148
    @hugo3148 4 หลายเดือนก่อน

    You are the best

  • @jameslee8997
    @jameslee8997 6 หลายเดือนก่อน

    It worked!! Thanks!

    • @discoverAll
      @discoverAll  6 หลายเดือนก่อน

      Glad it helped!

  • @y5mx
    @y5mx 3 หลายเดือนก่อน

    best best

  • @inaivomnaam4926
    @inaivomnaam4926 7 หลายเดือนก่อน

    this is my first project

    • @discoverAll
      @discoverAll  7 หลายเดือนก่อน +1

      To send an email using PHPMailer and Gmail SMTP on a live hosting server, follow these steps:
      1. Download PHPMailer:
      Download the PHPMailer library from the official GitHub repository: PHPMailer.
      Extract the downloaded zip file.
      2. Set up your PHP file:
      Create a PHP file (e.g., send_email.php) and include the following code:
      php
      Copy code
      3. Update SMTP Credentials:
      Replace 'your@gmail.com' with your Gmail email address.
      Replace 'your-gmail-password' with your Gmail password.
      Update the recipient's email address and name accordingly.
      4. Upload Files to Hosting Server:
      Upload the PHPMailer folder and your PHP file (send_email.php) to your hosting server using FTP or a file manager.
      5. Set File Permissions:
      Ensure that the PHPMailer files and your PHP file have the correct permissions on the server.
      6. Test the Script:
      Open the URL to your PHP file in a web browser (e.g., yourdomain.com/send_email.php) to test if the email is sent successfully.
      Make sure to keep your Gmail credentials secure and consider using an "App Password" if you have two-factor authentication enabled on your Gmail account.
      Note: Always be cautious about storing sensitive information in your code. It's recommended to use environment variables or a configuration file for storing credentials in a more secure way.

  • @igu642
    @igu642 3 หลายเดือนก่อน

    ❤❤

    • @discoverAll
      @discoverAll  3 หลายเดือนก่อน

      You're welcome 😊

  • @solasauto
    @solasauto 5 หลายเดือนก่อน +1

    Will this work after the changes of fall 2024?

  • @inaivomnaam4926
    @inaivomnaam4926 7 หลายเดือนก่อน

    i want to this use my website mail check otp function please help me

    • @discoverAll
      @discoverAll  7 หลายเดือนก่อน

      To send an email using PHPMailer and Gmail SMTP on a live hosting server, follow these steps:
      1. Download PHPMailer:
      Download the PHPMailer library from the official GitHub repository: PHPMailer.
      Extract the downloaded zip file.
      2. Set up your PHP file:
      Create a PHP file (e.g., send_email.php) and include the following code:
      php
      Copy code
      3. Update SMTP Credentials:
      Replace 'your@gmail.com' with your Gmail email address.
      Replace 'your-gmail-password' with your Gmail password.
      Update the recipient's email address and name accordingly.
      4. Upload Files to Hosting Server:
      Upload the PHPMailer folder and your PHP file (send_email.php) to your hosting server using FTP or a file manager.
      5. Set File Permissions:
      Ensure that the PHPMailer files and your PHP file have the correct permissions on the server.
      6. Test the Script:
      Open the URL to your PHP file in a web browser (e.g., yourdomain.com/send_email.php) to test if the email is sent successfully.
      Make sure to keep your Gmail credentials secure and consider using an "App Password" if you have two-factor authentication enabled on your Gmail account.
      Note: Always be cautious about storing sensitive information in your code. It's recommended to use environment variables or a configuration file for storing credentials in a more secure way.

  • @seestatustv
    @seestatustv 5 หลายเดือนก่อน

    sir it work fine on php 7 version but after updating to php 8 mail does not work..plz help sir iam struck sir

    • @discoverAll
      @discoverAll  5 หลายเดือนก่อน

      i made video on it thanks for comment

    • @seestatustv
      @seestatustv 5 หลายเดือนก่อน

      @@discoverAll thank you sir link video plzz sir

  • @inaivomnaam4926
    @inaivomnaam4926 7 หลายเดือนก่อน +1

    hello bro i did not send mail its continue error please help to live server

    • @discoverAll
      @discoverAll  7 หลายเดือนก่อน +1

      To send an email using PHPMailer and Gmail SMTP on a live hosting server, follow these steps:
      1. Download PHPMailer:
      Download the PHPMailer library from the official GitHub repository: PHPMailer.
      Extract the downloaded zip file.
      2. Set up your PHP file:
      Create a PHP file (e.g., send_email.php) and include the following code:
      php
      Copy code
      3. Update SMTP Credentials:
      Replace 'your@gmail.com' with your Gmail email address.
      Replace 'your-gmail-password' with your Gmail password.
      Update the recipient's email address and name accordingly.
      4. Upload Files to Hosting Server:
      Upload the PHPMailer folder and your PHP file (send_email.php) to your hosting server using FTP or a file manager.
      5. Set File Permissions:
      Ensure that the PHPMailer files and your PHP file have the correct permissions on the server.
      6. Test the Script:
      Open the URL to your PHP file in a web browser (e.g., yourdomain.com/send_email.php) to test if the email is sent successfully.
      Make sure to keep your Gmail credentials secure and consider using an "App Password" if you have two-factor authentication enabled on your Gmail account.
      Note: Always be cautious about storing sensitive information in your code. It's recommended to use environment variables or a configuration file for storing credentials in a more secure way.

    • @inaivomnaam4926
      @inaivomnaam4926 7 หลายเดือนก่อน

      i am try to many time please if you don't mind if you free connect my anydesk correct to my live server please

  • @technocrazysingh9645
    @technocrazysingh9645 6 หลายเดือนก่อน

    sir maine host kiya hai live but mail send nai ho raha hai email to gamil host name bhi sahi hai jab main send kar raha hu to return aa ja raha mail deliver nai ho raha

    • @discoverAll
      @discoverAll  6 หลายเดือนก่อน

      are test it before adding to website test is as shown in video if any error than create new email i Gmail

  • @nursyazwana1085
    @nursyazwana1085 3 หลายเดือนก่อน

    I still have mailer error , even after change the port..can you help me?

    • @discoverAll
      @discoverAll  3 หลายเดือนก่อน

      are you using php 8.1

    • @nursyazwana1085
      @nursyazwana1085 3 หลายเดือนก่อน

      @@discoverAllim using php 8.2.12

    • @nursyazwana1085
      @nursyazwana1085 3 หลายเดือนก่อน

      @@discoverAllcould you help me🙏🏻

  • @Zackaito01
    @Zackaito01 16 วันที่ผ่านมา

    can this use in godaddy