lonnieezell / myth-auth

One-stop Auth package for CodeIgniter 4
MIT License
634 stars 207 forks source link

Send Email Activation #439

Closed bagus-dev closed 2 years ago

bagus-dev commented 3 years ago

Don't know why when I use localhost there is no error, but when I deploy the project to hosting no matter it is paid or free I got "Failed to send activation message" again and again, I'm using gmail smtp, what I've been trying to do is: change PHP version but nothing works, or is there any config that must be changed when it goes to online? Thank you.

mjamilasfihani commented 3 years ago

can you share your email configuration?

(edit) Not your username and password, I mean like smtp, port and tls/ssl coniguration

sahbroe commented 2 years ago

me too, get the same problem

public $protocol = 'smtp'; public $mailPath = '/usr/sbin/sendmail'; public $SMTPHost = 'smtp.gmail.com'; public $SMTPPort = 465; public $SMTPTimeout = 60; public $SMTPKeepAlive = false; public $SMTPCrypto = 'ssl'; public $wordWrap = true; public $wrapChars = 76; public $mailType = 'html'; public $charset = 'UTF-8'; public $validate = false; public $priority = 3; public $CRLF = "\r\n"; public $newline = "\r\n"; public $BCCBatchMode = false; public $BCCBatchSize = 200; public $DSN = false;

mjamilasfihani commented 2 years ago

I am fan of .env, so here's mine :

 email.fromEmail = 'no-reply@example.com'
 email.fromName  = 'No-Reply Example'
 email.protocol  = smtp
 email.SMTPHost  = 'smtp.example.com'
 email.SMTPUser  = 'no-reply@example.com'
 email.SMTPPass  = 'xxxxxx'
 email.SMTPPort  = 465
 email.SMTPCrypto = 'ssl'
 email.mailType  = html

I leave all the builtin configuration by default. If the problem is still on fire, don't forget to enable IMAP and/or POP3 features and try to turn on Allow less secure apps too.

Good Luck

mjamilasfihani commented 2 years ago

Try to change the SMTPPort & SMTPCrypto too

MGatner commented 2 years ago

Closing as stale.