Case missmatch of function calls

This commit is contained in:
Michael Rosenberger
2018-12-03 21:14:22 +01:00
parent ec4d34d37a
commit 88a2cb37c9
5 changed files with 25 additions and 25 deletions

View File

@@ -204,11 +204,11 @@ abstract class ApiCommand extends ApiParameter
$this->mail->Port = Settings::Get('system.mail_smtp_port'); $this->mail->Port = Settings::Get('system.mail_smtp_port');
} }
if (PHPMailer::ValidateAddress(Settings::Get('panel.adminmail')) !== false) { if ( PHPMailer::validateAddress(Settings::Get('panel.adminmail')) !== false) {
// set return-to address and custom sender-name, see #76 // set return-to address and custom sender-name, see #76
$this->mail->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname')); $this->mail->setFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
if (Settings::Get('panel.adminmail_return') != '') { if (Settings::Get('panel.adminmail_return') != '') {
$this->mail->AddReplyTo(Settings::Get('panel.adminmail_return'), Settings::Get('panel.adminmail_defname')); $this->mail->addReplyTo(Settings::Get('panel.adminmail_return'), Settings::Get('panel.adminmail_defname'));
} }
} }
} }

View File

@@ -706,13 +706,13 @@ class Customers extends ApiCommand implements ResourceEntity
try { try {
$this->mailer()->Subject = $mail_subject; $this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body; $this->mailer()->AltBody = $mail_body;
$this->mailer()->MsgHTML(str_replace("\n", "<br />", $mail_body)); $this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->AddAddress($email, getCorrectUserSalutation(array( $this->mailer()->addAddress($email, getCorrectUserSalutation(array(
'firstname' => $firstname, 'firstname' => $firstname,
'name' => $name, 'name' => $name,
'company' => $company 'company' => $company
))); )));
$this->mailer()->Send(); $this->mailer()->send();
} catch (phpmailerException $e) { } catch (phpmailerException $e) {
$mailerr_msg = $e->errorMessage(); $mailerr_msg = $e->errorMessage();
$_mailerror = true; $_mailerror = true;
@@ -726,7 +726,7 @@ class Customers extends ApiCommand implements ResourceEntity
standard_error('errorsendingmail', $email, true); standard_error('errorsendingmail', $email, true);
} }
$this->mailer()->ClearAddresses(); $this->mailer()->clearAddresses();
$this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] automatically sent password to user '" . $loginname . "'"); $this->logger()->logAction(ADM_ACTION, LOG_NOTICE, "[API] automatically sent password to user '" . $loginname . "'");
} }
} }

View File

@@ -209,12 +209,12 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
$_mailerror = false; $_mailerror = false;
$mailerr_msg = ""; $mailerr_msg = "";
try { try {
$this->mailer()->SetFrom($admin['email'], getCorrectUserSalutation($admin)); $this->mailer()->setFrom($admin['email'], getCorrectUserSalutation($admin));
$this->mailer()->Subject = $mail_subject; $this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body; $this->mailer()->AltBody = $mail_body;
$this->mailer()->MsgHTML(str_replace("\n", "<br />", $mail_body)); $this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->AddAddress($email_full); $this->mailer()->addAddress($email_full);
$this->mailer()->Send(); $this->mailer()->send();
} catch (phpmailerException $e) { } catch (phpmailerException $e) {
$mailerr_msg = $e->errorMessage(); $mailerr_msg = $e->errorMessage();
$_mailerror = true; $_mailerror = true;
@@ -228,7 +228,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
standard_error('errorsendingmail', $email_full, true); standard_error('errorsendingmail', $email_full, true);
} }
$this->mailer()->ClearAddresses(); $this->mailer()->clearAddresses();
// customer wants to send the e-mail to an alternative email address too // customer wants to send the e-mail to an alternative email address too
if (Settings::Get('panel.sendalternativemail') == 1) { if (Settings::Get('panel.sendalternativemail') == 1) {
@@ -239,12 +239,12 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
$_mailerror = false; $_mailerror = false;
try { try {
$this->mailer()->SetFrom($admin['email'], getCorrectUserSalutation($admin)); $this->mailer()->setFrom($admin['email'], getCorrectUserSalutation($admin));
$this->mailer()->Subject = $mail_subject; $this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body; $this->mailer()->AltBody = $mail_body;
$this->mailer()->MsgHTML(str_replace("\n", "<br />", $mail_body)); $this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($customer)); $this->mailer()->addAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($customer));
$this->mailer()->Send(); $this->mailer()->send();
} catch (phpmailerException $e) { } catch (phpmailerException $e) {
$mailerr_msg = $e->errorMessage(); $mailerr_msg = $e->errorMessage();
$_mailerror = true; $_mailerror = true;
@@ -260,7 +260,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
), $alternative_email, true); ), $alternative_email, true);
} }
$this->mailer()->ClearAddresses(); $this->mailer()->clearAddresses();
} }
} }

View File

@@ -199,9 +199,9 @@ class Ftps extends ApiCommand implements ResourceEntity
try { try {
$this->mailer()->Subject = $mail_subject; $this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body; $this->mailer()->AltBody = $mail_body;
$this->mailer()->MsgHTML(str_replace("\n", "<br />", $mail_body)); $this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->AddAddress($customer['email'], getCorrectUserSalutation($customer)); $this->mailer()->addAddress($customer['email'], getCorrectUserSalutation($customer));
$this->mailer()->Send(); $this->mailer()->send();
} catch (phpmailerException $e) { } catch (phpmailerException $e) {
$mailerr_msg = $e->errorMessage(); $mailerr_msg = $e->errorMessage();
$_mailerror = true; $_mailerror = true;
@@ -215,7 +215,7 @@ class Ftps extends ApiCommand implements ResourceEntity
standard_error('errorsendingmail', $customer['email'], true); standard_error('errorsendingmail', $customer['email'], true);
} }
$this->mailer()->ClearAddresses(); $this->mailer()->clearAddresses();
} }
$this->logger()->logAction($this->isAdmin() ? ADM_ACTION : USR_ACTION, LOG_WARNING, "[API] added ftp-user '" . $username . "'"); $this->logger()->logAction($this->isAdmin() ? ADM_ACTION : USR_ACTION, LOG_WARNING, "[API] added ftp-user '" . $username . "'");

View File

@@ -142,9 +142,9 @@ class Mysqls extends ApiCommand implements ResourceEntity
try { try {
$this->mailer()->Subject = $mail_subject; $this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body; $this->mailer()->AltBody = $mail_body;
$this->mailer()->MsgHTML(str_replace("\n", "<br />", $mail_body)); $this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo)); $this->mailer()->addAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
$this->mailer()->Send(); $this->mailer()->send();
} catch (phpmailerException $e) { } catch (phpmailerException $e) {
$mailerr_msg = $e->errorMessage(); $mailerr_msg = $e->errorMessage();
$_mailerror = true; $_mailerror = true;
@@ -158,7 +158,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
standard_error('errorsendingmail', $userinfo['email'], true); standard_error('errorsendingmail', $userinfo['email'], true);
} }
$this->mailer()->ClearAddresses(); $this->mailer()->clearAddresses();
} }
$this->logger()->logAction($this->isAdmin() ? ADM_ACTION : USR_ACTION, LOG_WARNING, "[API] added mysql-database '" . $username . "'"); $this->logger()->logAction($this->isAdmin() ? ADM_ACTION : USR_ACTION, LOG_WARNING, "[API] added mysql-database '" . $username . "'");