PHP Classes

How to Use a PHP 2FA Email to Send Email Messages Via Gmail with Greater Security Using the Package PHP 2FA: Send messages using Gmail 2 Factor Authentication

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-11-08 (Yesterday) RSS 2.0 feedNot yet rated by the usersTotal: 3 This week: 3All time: 11,476 This week: 18Up
Version License PHP version Categories
php_2fa 1.0.0MIT/X Consortium ...5Email, PHP 5, Security
Description 

Author

This package can send messages using Gmail Two Factor Authentication.

It can take a configuration array created by Google that takes the SMTP host address, port, encryption method, user name, and application-specific password tied to a given user.

The package uses the PHPMailer class to send an email message with a given subject, recipient email address, and a text message.

Picture of Rodrigo Faustino
  Performance   Level  
Name: Rodrigo Faustino <contact>
Classes: 31 packages by
Country: Brazil Brazil
Innovation award
Innovation award
Nominee: 20x

Winner: 2x

Example

<?php
require '../vendor/autoload.php';

use
App\Services\EmailService;

$emailService = new EmailService();
$emailService->sendEmail('rodrigohipnose@gmail.com', 'Teste de E-mail', 'Este é um e-mail de teste.');


  Files folder image Files (5)  
File Role Description
Files folder imagesrc (1 file, 2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data

  Files folder image Files (5)  /  src  
File Role Description
Files folder imageconfig (1 file)
Files folder imageServices (1 file)
  Accessible without login Plain text file envia_email.php Example Example script

  Files folder image Files (5)  /  src  /  config  
File Role Description
  Accessible without login Plain text file config.php Aux. Configuration script

  Files folder image Files (5)  /  src  /  Services  
File Role Description
  Plain text file EmailService.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:3
This week:3
All time:11,476
This week:18Up