diff --git a/lib/classes/api/abstract.ApiCommand.php b/lib/classes/api/abstract.ApiCommand.php index fb703180..577f2e77 100644 --- a/lib/classes/api/abstract.ApiCommand.php +++ b/lib/classes/api/abstract.ApiCommand.php @@ -204,11 +204,11 @@ abstract class ApiCommand extends ApiParameter $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 - $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') != '') { - $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')); } } } diff --git a/lib/classes/api/commands/class.Customers.php b/lib/classes/api/commands/class.Customers.php index 154b7655..de432a72 100644 --- a/lib/classes/api/commands/class.Customers.php +++ b/lib/classes/api/commands/class.Customers.php @@ -706,13 +706,13 @@ class Customers extends ApiCommand implements ResourceEntity try { $this->mailer()->Subject = $mail_subject; $this->mailer()->AltBody = $mail_body; - $this->mailer()->MsgHTML(str_replace("\n", "
", $mail_body)); - $this->mailer()->AddAddress($email, getCorrectUserSalutation(array( + $this->mailer()->msgHTML(str_replace("\n", "
", $mail_body)); + $this->mailer()->addAddress($email, getCorrectUserSalutation(array( 'firstname' => $firstname, 'name' => $name, 'company' => $company ))); - $this->mailer()->Send(); + $this->mailer()->send(); } catch (phpmailerException $e) { $mailerr_msg = $e->errorMessage(); $_mailerror = true; @@ -726,7 +726,7 @@ class Customers extends ApiCommand implements ResourceEntity 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 . "'"); } } diff --git a/lib/classes/api/commands/class.EmailAccounts.php b/lib/classes/api/commands/class.EmailAccounts.php index a850c65f..d19d827e 100644 --- a/lib/classes/api/commands/class.EmailAccounts.php +++ b/lib/classes/api/commands/class.EmailAccounts.php @@ -209,12 +209,12 @@ class EmailAccounts extends ApiCommand implements ResourceEntity $_mailerror = false; $mailerr_msg = ""; try { - $this->mailer()->SetFrom($admin['email'], getCorrectUserSalutation($admin)); + $this->mailer()->setFrom($admin['email'], getCorrectUserSalutation($admin)); $this->mailer()->Subject = $mail_subject; $this->mailer()->AltBody = $mail_body; - $this->mailer()->MsgHTML(str_replace("\n", "
", $mail_body)); - $this->mailer()->AddAddress($email_full); - $this->mailer()->Send(); + $this->mailer()->msgHTML(str_replace("\n", "
", $mail_body)); + $this->mailer()->addAddress($email_full); + $this->mailer()->send(); } catch (phpmailerException $e) { $mailerr_msg = $e->errorMessage(); $_mailerror = true; @@ -228,7 +228,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity 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 if (Settings::Get('panel.sendalternativemail') == 1) { @@ -239,12 +239,12 @@ class EmailAccounts extends ApiCommand implements ResourceEntity $_mailerror = false; try { - $this->mailer()->SetFrom($admin['email'], getCorrectUserSalutation($admin)); + $this->mailer()->setFrom($admin['email'], getCorrectUserSalutation($admin)); $this->mailer()->Subject = $mail_subject; $this->mailer()->AltBody = $mail_body; - $this->mailer()->MsgHTML(str_replace("\n", "
", $mail_body)); - $this->mailer()->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($customer)); - $this->mailer()->Send(); + $this->mailer()->msgHTML(str_replace("\n", "
", $mail_body)); + $this->mailer()->addAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($customer)); + $this->mailer()->send(); } catch (phpmailerException $e) { $mailerr_msg = $e->errorMessage(); $_mailerror = true; @@ -260,7 +260,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity ), $alternative_email, true); } - $this->mailer()->ClearAddresses(); + $this->mailer()->clearAddresses(); } } diff --git a/lib/classes/api/commands/class.Ftps.php b/lib/classes/api/commands/class.Ftps.php index 4cab9039..60f747ec 100644 --- a/lib/classes/api/commands/class.Ftps.php +++ b/lib/classes/api/commands/class.Ftps.php @@ -199,9 +199,9 @@ class Ftps extends ApiCommand implements ResourceEntity try { $this->mailer()->Subject = $mail_subject; $this->mailer()->AltBody = $mail_body; - $this->mailer()->MsgHTML(str_replace("\n", "
", $mail_body)); - $this->mailer()->AddAddress($customer['email'], getCorrectUserSalutation($customer)); - $this->mailer()->Send(); + $this->mailer()->msgHTML(str_replace("\n", "
", $mail_body)); + $this->mailer()->addAddress($customer['email'], getCorrectUserSalutation($customer)); + $this->mailer()->send(); } catch (phpmailerException $e) { $mailerr_msg = $e->errorMessage(); $_mailerror = true; @@ -215,7 +215,7 @@ class Ftps extends ApiCommand implements ResourceEntity 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 . "'"); diff --git a/lib/classes/api/commands/class.Mysqls.php b/lib/classes/api/commands/class.Mysqls.php index b174d437..e66d407c 100644 --- a/lib/classes/api/commands/class.Mysqls.php +++ b/lib/classes/api/commands/class.Mysqls.php @@ -142,9 +142,9 @@ class Mysqls extends ApiCommand implements ResourceEntity try { $this->mailer()->Subject = $mail_subject; $this->mailer()->AltBody = $mail_body; - $this->mailer()->MsgHTML(str_replace("\n", "
", $mail_body)); - $this->mailer()->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo)); - $this->mailer()->Send(); + $this->mailer()->msgHTML(str_replace("\n", "
", $mail_body)); + $this->mailer()->addAddress($userinfo['email'], getCorrectUserSalutation($userinfo)); + $this->mailer()->send(); } catch (phpmailerException $e) { $mailerr_msg = $e->errorMessage(); $_mailerror = true; @@ -158,7 +158,7 @@ class Mysqls extends ApiCommand implements ResourceEntity 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 . "'");