Advertisement
Guest User

Untitled

a guest
Dec 1st, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace whmcs\module\mail;
  15.  
  16. class PhpMail implements \WHMCS\Module\Contracts\SenderModuleInterface
  17. {
  18. use \WHMCS\Module\MailSender\DescriptionTrait;
  19.  
  20. protected $mailer;
  21.  
  22. public function __construct()
  23. {
  24. $this->setDisplayName('PHP Mail (Default)');
  25. }
  26.  
  27. public function settings()
  28. {
  29. return [
  30. 'encoding' => ['FriendlyName' => \AdminLang::trans('general.mailencoding'), 'Type' => 'dropdown', 'Options' => \WHMCS\Mail\PhpMailer::getValidEncodings(), 'Default' => 0]
  31. ];
  32. }
  33.  
  34. public function testConnection(array $params)
  35. {
  36. $mail = $this->phpMailerInstance($params);
  37. $fromEmail = \WHMCS\Config\Setting::getValue('SystemEmailsFromEmail');
  38. $fromName = \WHMCS\Config\Setting::getValue('SystemEmailsFromName');
  39. $currentAdmin = \WHMCS\User\Admin::find(\WHMCS\Session::get('adminid'));
  40. $mail->addAddress($currentAdmin->email, $currentAdmin->fullName);
  41.  
  42. if (\WHMCS\Config\Setting::getValue('BCCMessages')) {
  43. $bcc = \WHMCS\Config\Setting::getValue('BCCMessages');
  44. $bcc = explode(',', $bcc);
  45.  
  46. foreach ($bcc as $value) {
  47. if (trim($value)) {
  48. .............................................................................
  49. ...............................................
  50. ....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement