PHPMailer

Send Email Using PHP With PHP Mailer –

Today we will tell you how you can send mail to someone through your own mail ID from your own website with the help of PHP Coding online, like on a normal basis we have to mail someone, then we open Gmail and click on Compose. Enter the mail and send the mail by entering the subject description, do you want to send mail through this process online through your website, then you can integrate this coding.

PHPMailer is a code library, that is integrated` to send emails securely and effectively by means of PHP code from a web server. Sending emails specifically via PHP code uses a high-level environment to setup SMTP standard convention and related issues and vulnerabilities around Mail infusion for spamming

 

PHP Send Email Full Step By Step

To email someone through PHP Mailer, you have to follow some of the steps given below

 

  1. Open the Gmail Account through the mail ID through which you are mailing someone.
  2. After opening the Gmail Dashboard, click on the Profile Icon in the Right Side Top, then click on the Manage your Google Account option.
  3. Then you get to see the dashboard of Google Account, now you click on Security Option.
  4. Signing in to Google Section in 2-Step Verification is an option, you have to turn it on on your Gmail account, if it is already on then it is good if it is off then turn it on.
  5. In the Signing in to Google section, you will be getting to see the option of App Passwords as you do 2 Step Verification On, then you have to click on the App Passwords option again.
  6. https://myaccount.google.com/u/1/apppasswords App Passwords Generate Link
  7. As you click on App Password, you will get the option to enter the password of Gmail ID, then you will get to see the dashboard of App Password, here you click on other (custom name) in the select app.
  8. Here you have to enter Web in the app name and click on Generate Button.
  9. Then the App Password of your Gmail ID is displayed in front of you, then you have to copy it somewhere, this password will be useful in sending mail to you.

 

You will have to do this process on the mail through which you are going to send the mail through the website, someone else will be told on his Gmail that this mail has come from this Gmail.

 

How to integrate PHPMailer in php

If you also want to use phpmailer in your website, then follow the steps given below carefully.

  1. First of all, click on this link https://github.com/PHPMailer/PHPMailer in Green Color, click on the Code button and download this mailer library.
  2. Then copy all the other files inside the ZIP file and create a new folder from where you are going to send mail, keep its name as “phpmailer“, later you can change it.
  3. Create a file named index.php and enter the code given below in it and save it.
  4. <?php
    use PHPMailer\PHPMailer\PHPMailer;
    use PHPMailer\PHPMailer\Exception;
    
    require 'phpmailer/src/Exception.php';
    require 'phpmailer/src/PHPMailer.php';
    require 'phpmailer/src/SMTP.php';
    
    if(isset($_POST['submit'])){
    	$mail = new PHPMailer(true);
    	$mail->isSMTP();
    	$mail->Host = 'smtp.gmail.com';
    	$mail->SMTPAuth = true;
    	$mail->Username = 'yourmail@gmail.com';
    	$mail->Password = 'app_password_your_mail';
    	$mail->SMTPSecure = 'ssl';
    	$mail->Port=465;
    	
    	$mail->setFrom('yourmail@gmail.com');
    	
    	$mail->addAddress($_POST['eamil']);
    	
    	$mail->isHTML(true);
    	
    	$mail->Subject = $_POST['sub'];
    	
    	$mail->Body = $_POST['des'];
           
    	$mail->send();
         
    	 echo "Send Successfullly";
       	
    }
    
    
    ?>
  5. Enter your Gmail in the above code where it says “'yourmail@gmail.com'“.
  6. In the above code, where 'app_password_your_mail' is written, remove it and enter the App Password Code, from where we will get this code, we have already told about it above.
  7. As you run the code, you will get to see the message “Send Successfully”.

The complete source code of PHPMailer is given here, you can download it and try it.

PHPMailer Source Download : Click Here

But SPEWS can be worse than annoying: thanks to a security vulnerability in a popular web software component called PHPMailer, crooks could use your “contact us” form to take over your whole website. 24/7 threat hunting, detection, and response delivered by an expert team as a fully-managed service

 

 

 

 

 

 

 

 

 

 

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

Leave a Reply

Your email address will not be published. Required fields are marked *