A complete PHP login system integrate with PhpMyAdmin and with various email APIs such as PHPMailer, SocketLabs, Mailer, and Laravel Swiftmailer
Note: PHPMailer and SocketLabs work fine on GoDaddy server, but not Laravel Swiftmailer
- Change log: Here
-
(Choose the one you want to use)
-
install PHPMailer:
composer require phpmailer/phpmailer
-
install SocketLabs:
composer require socketlabs/email-delivery
-
install Laravel Swiftmailer:
composer require "swiftmailer/swiftmailer:^6.0"
- Send email verification via Symfony Swift Mail:
- edit your email credentials in /config/constant.php
- change
require_once 'PHPMailer.php';
torequire_once 'SwiftMailer.php';
orrequire_once(SocketLabs.php);
orrequire_once(Mailer.php);
- change your SMTP server url (the first parameter)
Swift_SmtpTransport('smtp.gmail.com', 465, 'ssl'))
- Send email via PHP
mail()
:- no changes need
Mailer.php
may not work in some of GoDaddy's server and it is very slow- SocketLabs is instance email delivery
- PHPMailer maximum delay 1 minute and 15 seconds, but unable to work on computer's localhost
- Laravel Swiftmailer unable work on GoDaddy's server, but works perfectly on computer's localhost