Browse Source

Fix invalid "emailer_prepare" Hook

- Use IEmail instead of array data
- Introduce "composer" based library for phpmailer
pull/952/head
nupplaPhil 1 year ago
parent
commit
0fb7e2c647
No known key found for this signature in database GPG Key ID: D8365C3D36B77D90
76 changed files with 1903 additions and 637 deletions
  1. +22
    -0
      phpmailer/composer.json
  2. +35
    -34
      phpmailer/phpmailer.php
  3. +0
    -1
      phpmailer/phpmailer/VERSION
  4. +7
    -0
      phpmailer/vendor/autoload.php
  5. +445
    -0
      phpmailer/vendor/composer/ClassLoader.php
  6. +21
    -0
      phpmailer/vendor/composer/LICENSE
  7. +14
    -0
      phpmailer/vendor/composer/autoload_classmap.php
  8. +9
    -0
      phpmailer/vendor/composer/autoload_namespaces.php
  9. +10
    -0
      phpmailer/vendor/composer/autoload_psr4.php
  10. +52
    -0
      phpmailer/vendor/composer/autoload_real.php
  11. +40
    -0
      phpmailer/vendor/composer/autoload_static.php
  12. +66
    -0
      phpmailer/vendor/composer/installed.json
  13. +46
    -0
      phpmailer/vendor/phpmailer/phpmailer/COMMITMENT
  14. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/LICENSE
  15. +32
    -27
      phpmailer/vendor/phpmailer/phpmailer/README.md
  16. +3
    -1
      phpmailer/vendor/phpmailer/phpmailer/SECURITY.md
  17. +1
    -0
      phpmailer/vendor/phpmailer/phpmailer/VERSION
  18. +51
    -0
      phpmailer/vendor/phpmailer/phpmailer/composer.json
  19. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/get_oauth_token.php
  20. +25
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
  21. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php
  22. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php
  23. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php
  24. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ba.php
  25. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php
  26. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php
  27. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php
  28. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php
  29. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php
  30. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php
  31. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php
  32. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php
  33. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php
  34. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php
  35. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php
  36. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php
  37. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php
  38. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php
  39. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php
  40. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php
  41. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php
  42. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php
  43. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php
  44. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php
  45. +4
    -4
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php
  46. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php
  47. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php
  48. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php
  49. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php
  50. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php
  51. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php
  52. +25
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php
  53. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php
  54. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php
  55. +2
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php
  56. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php
  57. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt.php
  58. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php
  59. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php
  60. +8
    -8
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php
  61. +2
    -1
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php
  62. +3
    -2
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php
  63. +7
    -6
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php
  64. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php
  65. +27
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php
  66. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php
  67. +11
    -11
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-uk.php
  68. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php
  69. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php
  70. +0
    -0
      phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php
  71. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/src/Exception.php
  72. +1
    -1
      phpmailer/vendor/phpmailer/phpmailer/src/OAuth.php
  73. +805
    -463
      phpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php
  74. +9
    -9
      phpmailer/vendor/phpmailer/phpmailer/src/POP3.php
  75. +90
    -46
      phpmailer/vendor/phpmailer/phpmailer/src/SMTP.php
  76. +22
    -15
      securemail/securemail.php

+ 22
- 0
phpmailer/composer.json View File

@ -0,0 +1,22 @@
{
"name": "friendica-addons/phpmailer",
"description": "Replaces the default `mail()` function by the `PHPMailer` library",
"type": "friendica-addon",
"authors": [
{
"name": "Marcus Mueller",
"role": "Developer"
}
],
"require": {
"php": ">=7.0",
"phpmailer/phpmailer": "^6.1"
},
"license": "3-clause BSD license",
"minimum-stability": "stable",
"config": {
"optimize-autoloader": true,
"autoloader-suffix": "PhpMailerAddon",
"preferred-install": "dist"
}
}

+ 35
- 34
phpmailer/phpmailer.php View File

@ -10,10 +10,13 @@
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
use Friendica\Object\EMail\IEmail;
use Friendica\Util\ConfigFileLoader;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
function phpmailer_install()
{
Hook::register('load_config' , __FILE__, 'phpmailer_load_config');
@ -27,78 +30,76 @@ function phpmailer_load_config(App $a, ConfigFileLoader $loader)
/**
* @param App $a
* @param array $b
* @param IEmail $email
*/
function phpmailer_emailer_send_prepare(App $a, array &$b)
function phpmailer_emailer_send_prepare(App $a, IEmail &$email)
{
require_once __DIR__ . '/phpmailer/src/PHPMailer.php';
require_once __DIR__ . '/phpmailer/src/SMTP.php';
require_once __DIR__ . '/phpmailer/src/Exception.php';
// Passing `true` enables exceptions
$mail = new PHPMailer(true);
$mailer = new PHPMailer(true);
try {
if (DI::config()->get('phpmailer', 'smtp')) {
// Set mailer to use SMTP
$mail->isSMTP();
$mailer->isSMTP();
// Setup encoding.
$mail->CharSet = 'UTF-8';
$mail->Encoding = 'base64';
$mailer->CharSet = 'UTF-8';
$mailer->Encoding = 'base64';
// Specify main and backup SMTP servers
$mail->Host = DI::config()->get('phpmailer', 'smtp_server');
$mail->Port = DI::config()->get('phpmailer', 'smtp_port');
$mailer->Host = DI::config()->get('phpmailer', 'smtp_server');
$mailer->Port = DI::config()->get('phpmailer', 'smtp_port');
if (DI::config()->get('system', 'smtp_secure') && DI::config()->get('phpmailer', 'smtp_port_s')) {
$mail->SMTPSecure = DI::config()->get('phpmailer', 'smtp_secure');
$mail->Port = DI::config()->get('phpmailer', 'smtp_port_s');
$mailer->SMTPSecure = DI::config()->get('phpmailer', 'smtp_secure');
$mailer->Port = DI::config()->get('phpmailer', 'smtp_port_s');
}
if (DI::config()->get('phpmailer', 'smtp_username') && DI::config()->get('phpmailer', 'smtp_password')) {
$mail->SMTPAuth = true;
$mail->Username = DI::config()->get('phpmailer', 'smtp_username');
$mail->Password = DI::config()->get('phpmailer', 'smtp_password');
$mailer->SMTPAuth = true;
$mailer->Username = DI::config()->get('phpmailer', 'smtp_username');
$mailer->Password = DI::config()->get('phpmailer', 'smtp_password');
}
if (DI::config()->get('phpmailer', 'smtp_from')) {
$mail->setFrom(DI::config()->get('phpmailer', 'smtp_from'), $b['fromName']);
$mailer->setFrom(DI::config()->get('phpmailer', 'smtp_from'), $email->getFromName());
}
} else {
$mail->setFrom($b['fromEmail'], $b['fromName']);
$mailer->setFrom($email->getFromAddress(), $email->getFromName());
}
// subject
$mail->Subject = $b['messageSubject'];
$mailer->Subject = $email->getSubject();
if (!empty($b['toEmail'])) {
$mail->addAddress($b['toEmail']);
if (!empty($email->getToAddress())) {
$mailer->addAddress($email->getToAddress());
}
// html version
if (!empty($b['htmlVersion'])) {
$mail->isHTML(true);
$mail->Body = $b['htmlVersion'];
$mail->AltBody = $b['textVersion'];
if (!empty($email->getMessage())) {
$mailer->isHTML(true);
$mailer->Body = $email->getMessage();
$mailer->AltBody = $email->getMessage(true);
} else {
// add text
$mail->Body = $b['textVersion'];
$mailer->Body = $email->getMessage(true);
}
if (!empty($b['replyTo'])) {
$mail->addReplyTo($b['replyTo'], $b['fromName']);
if (!empty($email->getReplyTo())) {
$mailer->addReplyTo($email->getReplyTo(), $email->getFromName());
}
// additional headers
if (!empty($b['additionalMailHeader'])) {
foreach (explode("\n", trim($b['additionalMailHeader'])) as $header_line) {
if (!empty($email->getAdditionalMailHeader())) {
foreach (explode("\n", trim($email->getAdditionalMailHeader())) as $header_line) {
list($name, $value) = explode(':', $header_line, 2);
$mail->addCustomHeader(trim($name), trim($value));
$mailer->addCustomHeader(trim($name), trim($value));
}
}
$b['sent'] = $mail->send();
if ($mailer->send()) {
$email = null;
}
} catch (Exception $e) {
DI::logger()->error('PHPMailer error', ['ErrorInfo' => $mail->ErrorInfo, 'code' => $e->getCode(), 'message' => $e->getMessage()]);
DI::logger()->error('PHPMailer error', ['email' => $email, 'ErrorInfo' => $mailer->ErrorInfo, 'exception' => $e]);
}
}

+ 0
- 1
phpmailer/phpmailer/VERSION View File

@ -1 +0,0 @@
6.0.5

+ 7
- 0
phpmailer/vendor/autoload.php View File

@ -0,0 +1,7 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitPhpMailerAddon::getLoader();

+ 445
- 0
phpmailer/vendor/composer/ClassLoader.php View File

@ -0,0 +1,445 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}

+ 21
- 0
phpmailer/vendor/composer/LICENSE View File

@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

+ 14
- 0
phpmailer/vendor/composer/autoload_classmap.php View File

@ -0,0 +1,14 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'PHPMailer\\PHPMailer\\Exception' => $vendorDir . '/phpmailer/phpmailer/src/Exception.php',
'PHPMailer\\PHPMailer\\OAuth' => $vendorDir . '/phpmailer/phpmailer/src/OAuth.php',
'PHPMailer\\PHPMailer\\PHPMailer' => $vendorDir . '/phpmailer/phpmailer/src/PHPMailer.php',
'PHPMailer\\PHPMailer\\POP3' => $vendorDir . '/phpmailer/phpmailer/src/POP3.php',
'PHPMailer\\PHPMailer\\SMTP' => $vendorDir . '/phpmailer/phpmailer/src/SMTP.php',
);

+ 9
- 0
phpmailer/vendor/composer/autoload_namespaces.php View File

@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

+ 10
- 0
phpmailer/vendor/composer/autoload_psr4.php View File

@ -0,0 +1,10 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
);

+ 52
- 0
phpmailer/vendor/composer/autoload_real.php View File

@ -0,0 +1,52 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitPhpMailerAddon
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitPhpMailerAddon', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitPhpMailerAddon', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitPhpMailerAddon::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
return $loader;
}
}

+ 40
- 0
phpmailer/vendor/composer/autoload_static.php View File

@ -0,0 +1,40 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitPhpMailerAddon
{
public static $prefixLengthsPsr4 = array (
'P' =>
array (
'PHPMailer\\PHPMailer\\' => 20,
),
);
public static $prefixDirsPsr4 = array (
'PHPMailer\\PHPMailer\\' =>
array (
0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src',
),
);
public static $classMap = array (
'PHPMailer\\PHPMailer\\Exception' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/Exception.php',
'PHPMailer\\PHPMailer\\OAuth' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuth.php',
'PHPMailer\\PHPMailer\\PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/PHPMailer.php',
'PHPMailer\\PHPMailer\\POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/POP3.php',
'PHPMailer\\PHPMailer\\SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/SMTP.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitPhpMailerAddon::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitPhpMailerAddon::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitPhpMailerAddon::$classMap;
}, null, ClassLoader::class);
}
}

+ 66
- 0
phpmailer/vendor/composer/installed.json View File

@ -0,0 +1,66 @@
[
{
"name": "phpmailer/phpmailer",
"version": "v6.1.4",
"version_normalized": "6.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "c5e61d0729507049cec9673aa1a679f9adefd683"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c5e61d0729507049cec9673aa1a679f9adefd683",
"reference": "c5e61d0729507049cec9673aa1a679f9adefd683",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-filter": "*",
"php": ">=5.5.0"
},
"require-dev": {
"doctrine/annotations": "^1.2",
"friendsofphp/php-cs-fixer": "^2.2",
"phpunit/phpunit": "^4.8 || ^5.7"
},
"suggest": {
"ext-mbstring": "Needed to send email in multibyte encoding charset",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging",
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"time": "2019-12-10T11:17:38+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-only"
],
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP"
}
]

+ 46
- 0
phpmailer/vendor/phpmailer/phpmailer/COMMITMENT View File

@ -0,0 +1,46 @@
GPL Cooperation Commitment
Version 1.0
Before filing or continuing to prosecute any legal proceeding or claim
(other than a Defensive Action) arising from termination of a Covered
License, we commit to extend to the person or entity ('you') accused
of violating the Covered License the following provisions regarding
cure and reinstatement, taken from GPL version 3. As used here, the
term 'this License' refers to the specific Covered License being
enforced.
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly
and finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you
have received notice of violation of this License (for any work)
from that copyright holder, and you cure the violation prior to 30
days after your receipt of the notice.
We intend this Commitment to be irrevocable, and binding and
enforceable against us and assignees of or successors to our
copyrights.
Definitions
'Covered License' means the GNU General Public License, version 2
(GPLv2), the GNU Lesser General Public License, version 2.1
(LGPLv2.1), or the GNU Library General Public License, version 2
(LGPLv2), all as published by the Free Software Foundation.
'Defensive Action' means a legal proceeding or claim that We bring
against you in response to a prior proceeding or claim initiated by
you or your affiliate.
'We' means each contributor to this repository as of the date of
inclusion of this file, including subsidiaries of a corporate
contributor.
This work is available under a Creative Commons Attribution-ShareAlike
4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/).

phpmailer/phpmailer/LICENSE → phpmailer/vendor/phpmailer/phpmailer/LICENSE View File


phpmailer/phpmailer/README.md → phpmailer/vendor/phpmailer/phpmailer/README.md View File


phpmailer/phpmailer/SECURITY.md → phpmailer/vendor/phpmailer/phpmailer/SECURITY.md View File


+ 1
- 0
phpmailer/vendor/phpmailer/phpmailer/VERSION View File

@ -0,0 +1 @@
6.1.4

+ 51
- 0
phpmailer/vendor/phpmailer/phpmailer/composer.json View File

@ -0,0 +1,51 @@
{
"name": "phpmailer/phpmailer",
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"require": {
"php": ">=5.5.0",
"ext-ctype": "*",
"ext-filter": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.2",
"phpunit/phpunit": "^4.8 || ^5.7",
"doctrine/annotations": "^1.2"
},
"suggest": {
"psr/log": "For optional PSR-3 debug logging",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"autoload": {
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PHPMailer\\Test\\": "test/"
}
},
"license": "LGPL-2.1-only"
}

phpmailer/phpmailer/get_oauth_token.php → phpmailer/vendor/phpmailer/phpmailer/get_oauth_token.php View File


+ 25
- 0
phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php View File

@ -0,0 +1,25 @@
<?php
/**
* Afrikaans PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: kon nie geverifieer word nie.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon nie aan SMTP-verbind nie.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data nie aanvaar nie.';
$PHPMAILER_LANG['empty_message'] = 'Boodskapliggaam leeg.';
$PHPMAILER_LANG['encoding'] = 'Onbekende kodering: ';
$PHPMAILER_LANG['execute'] = 'Kon nie uitvoer nie: ';
$PHPMAILER_LANG['file_access'] = 'Kon nie lêer oopmaak nie: ';
$PHPMAILER_LANG['file_open'] = 'Lêerfout: Kon nie lêer oopmaak nie: ';
$PHPMAILER_LANG['from_failed'] = 'Die volgende Van adres misluk: ';
$PHPMAILER_LANG['instantiate'] = 'Kon nie posfunksie instansieer nie.';
$PHPMAILER_LANG['invalid_address'] = 'Ongeldige adres: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer word nie ondersteun nie.';
$PHPMAILER_LANG['provide_address'] = 'U moet ten minste een ontvanger e-pos adres verskaf.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: Die volgende ontvangers het misluk: ';
$PHPMAILER_LANG['signing'] = 'Ondertekening Fout: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP-verbinding () misluk.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-bediener fout: ';
$PHPMAILER_LANG['variable_set'] = 'Kan nie veranderlike instel of herstel nie: ';
$PHPMAILER_LANG['extension_missing'] = 'Uitbreiding ontbreek: ';

phpmailer/phpmailer/language/phpmailer.lang-am.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php View File


phpmailer/phpmailer/language/phpmailer.lang-ar.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php View File


phpmailer/phpmailer/language/phpmailer.lang-az.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php View File


phpmailer/phpmailer/language/phpmailer.lang-ba.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ba.php View File


phpmailer/phpmailer/language/phpmailer.lang-be.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php View File


phpmailer/phpmailer/language/phpmailer.lang-bg.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php View File


phpmailer/phpmailer/language/phpmailer.lang-ca.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php View File


phpmailer/phpmailer/language/phpmailer.lang-ch.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php View File


phpmailer/phpmailer/language/phpmailer.lang-cs.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php View File


phpmailer/phpmailer/language/phpmailer.lang-da.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php View File


phpmailer/phpmailer/language/phpmailer.lang-de.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php View File


phpmailer/phpmailer/language/phpmailer.lang-el.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php View File


phpmailer/phpmailer/language/phpmailer.lang-eo.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php View File


phpmailer/phpmailer/language/phpmailer.lang-es.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php View File


phpmailer/phpmailer/language/phpmailer.lang-et.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php View File


phpmailer/phpmailer/language/phpmailer.lang-fa.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php View File


phpmailer/phpmailer/language/phpmailer.lang-fi.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php View File


phpmailer/phpmailer/language/phpmailer.lang-fo.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php View File


phpmailer/phpmailer/language/phpmailer.lang-fr.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php View File


phpmailer/phpmailer/language/phpmailer.lang-gl.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php View File


phpmailer/phpmailer/language/phpmailer.lang-he.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php View File


phpmailer/phpmailer/language/phpmailer.lang-hi.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php View File


phpmailer/phpmailer/language/phpmailer.lang-hr.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php View File


phpmailer/phpmailer/language/phpmailer.lang-hu.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php View File


phpmailer/phpmailer/language/phpmailer.lang-id.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php View File


phpmailer/phpmailer/language/phpmailer.lang-it.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php View File


phpmailer/phpmailer/language/phpmailer.lang-ja.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php View File


phpmailer/phpmailer/language/phpmailer.lang-ka.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php View File


phpmailer/phpmailer/language/phpmailer.lang-ko.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php View File


phpmailer/phpmailer/language/phpmailer.lang-lt.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php View File


phpmailer/phpmailer/language/phpmailer.lang-lv.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php View File


+ 25
- 0
phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php View File

@ -0,0 +1,25 @@
<?php
/**
* Malagasy PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Hackinet <piyushjha8164@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.';
$PHPMAILER_LANG['empty_message'] = 'Tsy misy ny votoaty mailaka.';
$PHPMAILER_LANG['encoding'] = 'Tsy fantatra encoding: ';
$PHPMAILER_LANG['execute'] = 'Tsy afaka manatanteraka ity baiko manaraka ity: ';
$PHPMAILER_LANG['file_access'] = 'Tsy nahomby ny fidirana amin\'ity rakitra ity: ';
$PHPMAILER_LANG['file_open'] = 'Hadisoana diso: Tsy afaka nanokatra ity file manaraka ity: ';
$PHPMAILER_LANG['from_failed'] = 'Ny adiresy iraka manaraka dia diso: ';
$PHPMAILER_LANG['instantiate'] = 'Tsy afaka nanomboka ny hetsika mail.';
$PHPMAILER_LANG['invalid_address'] = 'Tsy mety ny adiresy: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tsy manohana.';
$PHPMAILER_LANG['provide_address'] = 'Alefaso azafady iray adiresy iray farafahakeliny.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Tsy mety ireo mpanaraka ireto: ';
$PHPMAILER_LANG['signing'] = 'Error nandritra ny sonia:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Tsy nahomby ny fifandraisana tamin\'ny server SMTP.';
$PHPMAILER_LANG['smtp_error'] = 'Fahadisoana tamin\'ny server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Tsy azo atao ny mametraka na mamerina ny variable: ';
$PHPMAILER_LANG['extension_missing'] = 'Tsy hita ny ampahany: ';

phpmailer/phpmailer/language/phpmailer.lang-ms.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php View File


phpmailer/phpmailer/language/phpmailer.lang-nb.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php View File


phpmailer/phpmailer/language/phpmailer.lang-nl.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php View File


phpmailer/phpmailer/language/phpmailer.lang-pl.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php View File


phpmailer/phpmailer/language/phpmailer.lang-pt.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt.php View File


phpmailer/phpmailer/language/phpmailer.lang-pt_br.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php View File


phpmailer/phpmailer/language/phpmailer.lang-ro.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php View File


phpmailer/phpmailer/language/phpmailer.lang-ru.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php View File


phpmailer/phpmailer/language/phpmailer.lang-sk.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php View File


phpmailer/phpmailer/language/phpmailer.lang-sl.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php View File


phpmailer/phpmailer/language/phpmailer.lang-rs.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php View File


phpmailer/phpmailer/language/phpmailer.lang-sv.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php View File


+ 27
- 0
phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php View File

@ -0,0 +1,27 @@
<?php
/**
* Tagalog PHPMailer language file: refer to English translation for definitive list
*
* @package PHPMailer
* @author Adriane Justine Tan <adrianetan12@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi maaaring matatanggap.';
$PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe';
$PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: ';
$PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: ';
$PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: ';
$PHPMAILER_LANG['file_open'] = 'Hindi mabuksan ang file: ';
$PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: ';
$PHPMAILER_LANG['instantiate'] = 'Hindi maaaring magbigay ng institusyon ang mail';
$PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: ';
$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado';
$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: ';
$PHPMAILER_LANG['signing'] = 'Hindi ma-sign';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo';
$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo';
$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda ang mga variables: ';
$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension';

phpmailer/phpmailer/language/phpmailer.lang-tr.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php View File


phpmailer/phpmailer/language/phpmailer.lang-uk.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-uk.php View File


phpmailer/phpmailer/language/phpmailer.lang-vi.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php View File


phpmailer/phpmailer/language/phpmailer.lang-zh.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php View File


phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php → phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php View File


phpmailer/phpmailer/src/Exception.php → phpmailer/vendor/phpmailer/phpmailer/src/Exception.php View File


phpmailer/phpmailer/src/OAuth.php → phpmailer/vendor/phpmailer/phpmailer/src/OAuth.php View File


phpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php
File diff suppressed because it is too large
View File


phpmailer/phpmailer/src/POP3.php → phpmailer/vendor/phpmailer/phpmailer/src/POP3.php View File


phpmailer/phpmailer/src/SMTP.php → phpmailer/vendor/phpmailer/phpmailer/src/SMTP.php View File


+ 22
- 15
securemail/securemail.php View File

@ -12,6 +12,7 @@ use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Object\EMail\IEmail;
require_once __DIR__ . '/vendor/autoload.php';
@ -109,17 +110,17 @@ function securemail_settings_post(App &$a, array &$b)
* @link https://github.com/friendica/friendica/blob/develop/doc/Addons.md#emailer_send_prepare 'emailer_send_prepare' hook
*
* @param App $a App instance
* @param array $b hook data
* @param IEmail $email Email
*
* @see App
*/
function securemail_emailer_send_prepare(App &$a, array &$b)
function securemail_emailer_send_prepare(App &$a, IEmail &$email)
{
if (empty($b['uid'])) {
if (empty($email->getRecipientUid())) {
return;
}
$uid = $b['uid'];
$uid = $email->getRecipientUid();
$enable_checked = DI::pConfig()->get($uid, 'securemail', 'enable');
if (!$enable_checked) {
@ -134,18 +135,24 @@ function securemail_emailer_send_prepare(App &$a, array &$b)
$key = OpenPGP_Message::parse($public_key);
$data = new OpenPGP_LiteralDataPacket($b['textVersion'], [
$data = new OpenPGP_LiteralDataPacket($email->getMessage(true), [
'format' => 'u',
'filename' => 'encrypted.gpg'
]);
$encrypted = OpenPGP_Crypt_Symmetric::encrypt($key, new OpenPGP_Message([$data]));
$armored_encrypted = wordwrap(
OpenPGP::enarmor($encrypted->to_bytes(), 'PGP MESSAGE'),
64,
"\n",
true
);
$b['textVersion'] = $armored_encrypted;
$b['htmlVersion'] = null;
try {
$encrypted = OpenPGP_Crypt_Symmetric::encrypt($key, new OpenPGP_Message([$data]));
$armored_encrypted = wordwrap(
OpenPGP::enarmor($encrypted->to_bytes(), 'PGP MESSAGE'),
64,
"\n",
true
);
$email = Friendica\Object\EMail::createFromPrototype($email, [
'textVersion' => $armored_encrypted,
'htmlVersion' => null,
]);
} catch (Exception $e) {
DI::logger()->warning('Encryption failed.', ['email' => $email, 'exception' => $e]);
}
}

Loading…
Cancel
Save