From b4dcbc98461b46e6afa04bfda1f4d55208252a07 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 16 Feb 2017 22:04:51 -0500 Subject: [PATCH] Getting started on email sender for customer ticket creation --- api/BusinessLogic/Emails/EmailBuilder.php | 14 +++++ api/BusinessLogic/Emails/EmailSender.php | 25 ++++++++ .../Emails/MailgunEmailSender.php | 29 +++++++++ .../Emails/PhpMailEmailSender.php | 29 +++++++++ api/BusinessLogic/Emails/StmpEmailSender.php | 29 +++++++++ api/BusinessLogic/Security/BannedEmail.php | 6 -- api/BusinessLogic/Security/BannedIp.php | 6 -- .../Security/UserContextNotifications.php | 6 -- .../Security/UserContextPreferences.php | 6 -- api/BusinessLogic/Statuses/Closable.php | 6 -- .../Statuses/DefaultStatusForAction.php | 6 -- api/BusinessLogic/Statuses/StatusLanguage.php | 6 -- api/BusinessLogic/Tickets/Attachment.php | 6 -- api/BusinessLogic/Tickets/Autoassigner.php | 6 -- .../CustomFields/CustomFieldValidator.php | 6 -- .../Tickets/TicketGatewayGeneratedFields.php | 6 -- api/BusinessLogic/Tickets/TicketRetriever.php | 6 -- api/BusinessLogic/Validators.php | 6 -- api/Controllers/JsonRetriever.php | 6 -- api/Core/Constants/CustomField.php | 6 -- api/DataAccess/Statuses/StatusGateway.php | 1 - .../Security/BanRetrieverTest.php | 6 -- .../CustomFields/CustomFieldValidatorTest.php | 6 -- .../Tickets/NewTicketValidatorTest.php | 6 -- .../CreateTicketForCustomerTest.php | 6 -- .../Tickets/TrackingIdGeneratorTest.php | 6 -- api/composer.json | 3 +- api/composer.lock | 62 ++++++++++++++++++- 28 files changed, 189 insertions(+), 123 deletions(-) create mode 100644 api/BusinessLogic/Emails/EmailBuilder.php create mode 100644 api/BusinessLogic/Emails/EmailSender.php create mode 100644 api/BusinessLogic/Emails/MailgunEmailSender.php create mode 100644 api/BusinessLogic/Emails/PhpMailEmailSender.php create mode 100644 api/BusinessLogic/Emails/StmpEmailSender.php diff --git a/api/BusinessLogic/Emails/EmailBuilder.php b/api/BusinessLogic/Emails/EmailBuilder.php new file mode 100644 index 00000000..62739d00 --- /dev/null +++ b/api/BusinessLogic/Emails/EmailBuilder.php @@ -0,0 +1,14 @@ +=5.0.0" + }, + "require-dev": { + "phpdocumentor/phpdocumentor": "*", + "phpunit/phpunit": "4.7.*" + }, + "suggest": { + "league/oauth2-google": "Needed for Google XOAUTH2 authentication" + }, + "type": "library", + "autoload": { + "classmap": [ + "class.phpmailer.php", + "class.phpmaileroauth.php", + "class.phpmaileroauthgoogle.php", + "class.smtp.php", + "class.pop3.php", + "extras/EasyPeasyICS.php", + "extras/ntlm_sasl_client.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "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", + "time": "2017-01-09T09:33:47+00:00" + }, { "name": "phpspec/prophecy", "version": "dev-master",