2013-01-15 21:03:44 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorPHPMailerConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('PHPMailer');
|
2013-01-15 21:03:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Configure PHPMailer.');
|
2013-01-15 21:03:44 +01:00
|
|
|
}
|
|
|
|
|
2016-01-28 17:40:22 +01:00
|
|
|
public function getIcon() {
|
2015-02-02 19:17:25 +01:00
|
|
|
return 'fa-send-o';
|
|
|
|
}
|
|
|
|
|
2015-02-09 22:10:56 +01:00
|
|
|
public function getGroup() {
|
|
|
|
return 'core';
|
|
|
|
}
|
|
|
|
|
2013-01-15 21:03:44 +01:00
|
|
|
public function getOptions() {
|
|
|
|
return array(
|
|
|
|
$this->newOption('phpmailer.mailer', 'string', 'smtp')
|
2014-05-01 19:23:49 +02:00
|
|
|
->setLocked(true)
|
2014-06-09 20:36:49 +02:00
|
|
|
->setSummary(pht('Configure mailer used by PHPMailer.'))
|
2013-01-15 21:03:44 +01:00
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
"If you're using PHPMailer to send email, provide the mailer and ".
|
|
|
|
"options here. PHPMailer is much more enormous than ".
|
|
|
|
"PHPMailerLite, and provides more mailers and greater enormity. ".
|
|
|
|
"You need it when you want to use SMTP instead of sendmail as the ".
|
|
|
|
"mailer.")),
|
|
|
|
$this->newOption('phpmailer.smtp-host', 'string', null)
|
2014-05-01 19:23:49 +02:00
|
|
|
->setLocked(true)
|
2013-01-15 21:03:44 +01:00
|
|
|
->setDescription(pht('Host for SMTP.')),
|
|
|
|
$this->newOption('phpmailer.smtp-port', 'int', 25)
|
2014-05-01 19:23:49 +02:00
|
|
|
->setLocked(true)
|
2013-01-15 21:03:44 +01:00
|
|
|
->setDescription(pht('Port for SMTP.')),
|
|
|
|
// TODO: Implement "enum"? Valid values are empty, 'tls', or 'ssl'.
|
|
|
|
$this->newOption('phpmailer.smtp-protocol', 'string', null)
|
2014-05-01 19:23:49 +02:00
|
|
|
->setLocked(true)
|
2013-01-15 21:03:44 +01:00
|
|
|
->setSummary(pht('Configure TLS or SSL for SMTP.'))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
2015-05-22 09:27:56 +02:00
|
|
|
"Using PHPMailer with SMTP, you can set this to one of '%s' or ".
|
|
|
|
"'%s' to use TLS or SSL, respectively. Leave it blank for ".
|
|
|
|
"vanilla SMTP. If you're sending via Gmail, set it to '%s'.",
|
|
|
|
'tls',
|
|
|
|
'ssl',
|
|
|
|
'ssl')),
|
2013-01-15 21:03:44 +01:00
|
|
|
$this->newOption('phpmailer.smtp-user', 'string', null)
|
2014-05-01 19:23:49 +02:00
|
|
|
->setLocked(true)
|
2013-01-15 21:03:44 +01:00
|
|
|
->setDescription(pht('Username for SMTP.')),
|
|
|
|
$this->newOption('phpmailer.smtp-password', 'string', null)
|
2015-02-13 19:59:50 +01:00
|
|
|
->setHidden(true)
|
2013-01-15 21:03:44 +01:00
|
|
|
->setDescription(pht('Password for SMTP.')),
|
2016-06-09 22:17:58 +02:00
|
|
|
$this->newOption('phpmailer.smtp-encoding', 'string', 'base64')
|
2014-09-02 19:47:34 +02:00
|
|
|
->setSummary(pht('Configure how mail is encoded.'))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
"Mail is normally encoded in `8bit`, which works correctly with ".
|
|
|
|
"most MTAs. However, some MTAs do not work well with this ".
|
|
|
|
"encoding. If you're having trouble with mail being mangled or ".
|
|
|
|
"arriving with too many or too few newlines, you may try ".
|
|
|
|
"adjusting this setting.\n\n".
|
2016-06-09 22:17:58 +02:00
|
|
|
"Supported values are `8bit`, `quoted-printable`, ".
|
|
|
|
"`7bit`, `binary` and `base64`.")),
|
2013-01-15 21:03:44 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|