Getting started on email sender for customer ticket creation
parent
ca499d5eac
commit
b4dcbc9846
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BusinessLogic\Emails;
|
||||||
|
|
||||||
|
|
||||||
|
class EmailBuilder {
|
||||||
|
private $to;
|
||||||
|
private $cc;
|
||||||
|
private $bcc;
|
||||||
|
private $subject;
|
||||||
|
private $message;
|
||||||
|
private $htmlMessage;
|
||||||
|
private $attachments;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BusinessLogic\Emails;
|
||||||
|
|
||||||
|
|
||||||
|
use BusinessLogic\Tickets\Attachment;
|
||||||
|
use BusinessLogic\Tickets\Ticket;
|
||||||
|
|
||||||
|
interface EmailSender {
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $ticket Ticket
|
||||||
|
* @param $attachments Attachment[]
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmailWithTicket($emailBuilder, $ticket, $attachments, $heskSettings, $modsForHeskSettings);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BusinessLogic\Emails;
|
||||||
|
|
||||||
|
|
||||||
|
use BusinessLogic\Tickets\Attachment;
|
||||||
|
use BusinessLogic\Tickets\Ticket;
|
||||||
|
|
||||||
|
class MailgunEmailSender implements EmailSender {
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings) {
|
||||||
|
// TODO: Implement sendEmail() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $ticket Ticket
|
||||||
|
* @param $attachments Attachment[]
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmailWithTicket($emailBuilder, $ticket, $attachments, $heskSettings, $modsForHeskSettings) {
|
||||||
|
// TODO: Implement sendEmailWithTicket() method.
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BusinessLogic\Emails;
|
||||||
|
|
||||||
|
|
||||||
|
use BusinessLogic\Tickets\Attachment;
|
||||||
|
use BusinessLogic\Tickets\Ticket;
|
||||||
|
|
||||||
|
class PhpMailEmailSender implements EmailSender {
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings) {
|
||||||
|
// TODO: Implement sendEmail() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $ticket Ticket
|
||||||
|
* @param $attachments Attachment[]
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmailWithTicket($emailBuilder, $ticket, $attachments, $heskSettings, $modsForHeskSettings) {
|
||||||
|
// TODO: Implement sendEmailWithTicket() method.
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BusinessLogic\Emails;
|
||||||
|
|
||||||
|
|
||||||
|
use BusinessLogic\Tickets\Attachment;
|
||||||
|
use BusinessLogic\Tickets\Ticket;
|
||||||
|
|
||||||
|
class StmpEmailSender implements EmailSender {
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings) {
|
||||||
|
// TODO: Implement sendEmail() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $emailBuilder EmailBuilder
|
||||||
|
* @param $ticket Ticket
|
||||||
|
* @param $attachments Attachment[]
|
||||||
|
* @param $heskSettings array
|
||||||
|
* @param $modsForHeskSettings array
|
||||||
|
*/
|
||||||
|
function sendEmailWithTicket($emailBuilder, $ticket, $attachments, $heskSettings, $modsForHeskSettings) {
|
||||||
|
// TODO: Implement sendEmailWithTicket() method.
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue