Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 677 Bytes

File metadata and controls

26 lines (19 loc) · 677 Bytes

How to use?

$config = new \PHPAuth\Config($pdo);

$config->setMailer(new \PHPAuth\Mailer\PHPMailerDriver([
    'debug'     =>  true,

    'auth'      =>  true,
    'username'  =>  'your-email@gmail.com',
    'password'  =>  'your-password',
    
    'secure'    =>  \PHPMailer\PHPMailer\PHPMailer::ENCRYPTION_STARTTLS, // 'tls'
    // OR
    'secure'    =>  \PHPMailer\PHPMailer\PHPMailer::ENCRYPTION_SMTPS,   // 'ssl'
    
    'host'      =>  'smtp.gmail.com',
    'port'      =>  587, // relative to security type 

    // setFrom
    'site_email'    => 'noreply@yoursite.com',
    'site_name'     => 'Your Site'
]));

$auth = new \PHPAuth\Auth($pdo, $config);