Created
April 20, 2023 09:31
-
-
Save datamweb/0283c42297ab78a8d20c00d4a97fe2bb to your computer and use it in GitHub Desktop.
Codeigniter4 Email Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Config; | |
use CodeIgniter\Config\BaseConfig; | |
class Email extends BaseConfig | |
{ | |
public string $fromEmail = '[email protected]'; | |
public string $fromName = 'codeIgniter4DotIR'; | |
public string $recipients = ''; | |
/** | |
* The "user agent" | |
*/ | |
public string $userAgent = 'CodeIgniter4.ir'; | |
/** | |
* The mail sending protocol: mail, sendmail, smtp | |
*/ | |
public string $protocol = 'smtp'; | |
/** | |
* The server path to Sendmail. | |
*/ | |
public string $mailPath = '/usr/sbin/sendmail'; | |
/** | |
* SMTP Server Address | |
*/ | |
public string $SMTPHost = 'smtp.gmail.com'; | |
/** | |
* SMTP Username | |
*/ | |
public string $SMTPUser = '[email protected]'; | |
/** | |
* SMTP Password | |
*/ | |
public string $SMTPPass = 'set app email password here @see https://myaccount.google.com/apppasswords'; | |
/** | |
* SMTP Port | |
*/ | |
public int $SMTPPort = 587; | |
/** | |
* SMTP Timeout (in seconds) | |
*/ | |
public int $SMTPTimeout = 5; | |
/** | |
* Enable persistent SMTP connections | |
*/ | |
public bool $SMTPKeepAlive = false; | |
/** | |
* SMTP Encryption. Either tls or ssl | |
*/ | |
public string $SMTPCrypto = 'tls'; | |
/** | |
* Enable word-wrap | |
*/ | |
public bool $wordWrap = true; | |
/** | |
* Character count to wrap at | |
*/ | |
public int $wrapChars = 76; | |
/** | |
* Type of mail, either 'text' or 'html' | |
*/ | |
public string $mailType = 'html'; | |
/** | |
* Character set (utf-8, iso-8859-1, etc.) | |
*/ | |
public string $charset = 'UTF-8'; | |
/** | |
* Whether to validate the email address | |
*/ | |
public bool $validate = false; | |
/** | |
* Email Priority. 1 = highest. 5 = lowest. 3 = normal | |
*/ | |
public int $priority = 3; | |
/** | |
* Newline character. (Use “\r\n” to comply with RFC 822) | |
*/ | |
public string $CRLF = "\r\n"; | |
/** | |
* Newline character. (Use “\r\n” to comply with RFC 822) | |
*/ | |
public string $newline = "\r\n"; | |
/** | |
* Enable BCC Batch Mode.s | |
*/ | |
public bool $BCCBatchMode = false; | |
/** | |
* Number of emails in each BCC batch | |
*/ | |
public int $BCCBatchSize = 200; | |
/** | |
* Enable notify message from server | |
*/ | |
public bool $DSN = false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Config; | |
use CodeIgniter\Config\BaseConfig; | |
class Email extends BaseConfig | |
{ | |
public string $fromEmail = '[email protected]'; | |
public string $fromName = 'codeigniter4DotIr'; | |
public string $recipients = ''; | |
/** | |
* The "user agent" | |
*/ | |
public string $userAgent = 'CodeIgniter4ir'; | |
/** | |
* The mail sending protocol: mail, sendmail, smtp | |
*/ | |
public string $protocol = 'mail'; | |
/** | |
* The server path to Sendmail. | |
*/ | |
public string $mailPath = '/usr/sbin/sendmail'; | |
/** | |
* SMTP Server Address | |
*/ | |
public string $SMTPHost = 'mail.codeigniter4.ir'; | |
/** | |
* SMTP Username | |
*/ | |
public string $SMTPUser = '[email protected]'; | |
/** | |
* SMTP Password | |
*/ | |
public string $SMTPPass = 'set email password here!!'; | |
/** | |
* SMTP Port | |
*/ | |
public int $SMTPPort = 465; | |
/** | |
* SMTP Timeout (in seconds) | |
*/ | |
public int $SMTPTimeout = 5; | |
/** | |
* Enable persistent SMTP connections | |
*/ | |
public bool $SMTPKeepAlive = false; | |
/** | |
* SMTP Encryption. Either tls or ssl | |
*/ | |
public string $SMTPCrypto = 'tls'; | |
/** | |
* Enable word-wrap | |
*/ | |
public bool $wordWrap = true; | |
/** | |
* Character count to wrap at | |
*/ | |
public int $wrapChars = 76; | |
/** | |
* Type of mail, either 'text' or 'html' | |
*/ | |
public string $mailType = 'html'; | |
/** | |
* Character set (utf-8, iso-8859-1, etc.) | |
*/ | |
public string $charset = 'UTF-8'; | |
/** | |
* Whether to validate the email address | |
*/ | |
public bool $validate = false; | |
/** | |
* Email Priority. 1 = highest. 5 = lowest. 3 = normal | |
*/ | |
public int $priority = 3; | |
/** | |
* Newline character. (Use “\r\n” to comply with RFC 822) | |
*/ | |
public string $CRLF = "\r\n"; | |
/** | |
* Newline character. (Use “\r\n” to comply with RFC 822) | |
*/ | |
public string $newline = "\r\n"; | |
/** | |
* Enable BCC Batch Mode. | |
*/ | |
public bool $BCCBatchMode = false; | |
/** | |
* Number of emails in each BCC batch | |
*/ | |
public int $BCCBatchSize = 200; | |
/** | |
* Enable notify message from server | |
*/ | |
public bool $DSN = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment