Skip to content
Snippets Groups Projects
Mail.php 5.47 KiB
<?php

namespace SGalinski\SgMail\Domain\Model;

/***************************************************************
 *  Copyright notice
 *
 *  (c) sgalinski Internet Services (https://www.sgalinski.de)
 *
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 *  free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  The GNU General Public License can be found at
 *  http://www.gnu.org/copyleft/gpl.html.
 *
 *  This script is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/

use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

/**
 * Mail domain model
 */
class Mail extends AbstractEntity {
	// Just some default values for better API calls.
	const PRIORITY_LOWEST = 0;
	const PRIORITY_LOW = 50;
	const PRIORITY_MEDIUM = 100;
	const PRIORITY_HIGH = 150;
	const PRIORITY_HIGHEST = 200;

	/**
	 * @var string
	 */
	protected $language = '';

	/**
	 * @var string
	 */
	protected $mailSubject = '';

	/**
	 * @var string
	 */
	protected $mailBody = '';

	/**
	 * @var string
	 */
	protected $toAddress = '';

	/**
	 * @var string
	 */
	protected $fromAddress = '';

	/**
	 * @var int
	 */
	protected $priority = 0;

	/**
	 * @var string
	 */
	protected $bccAddresses = '';

	/**
	 * @var string
	 */
	protected $ccAddresses = '';

	/**
	 * @var string
	 */
	protected $fromName = '';

	/**
	 * @var string
	 */
	protected $extensionKey = '';

	/**
	 * @var string
	 */
	protected $templateName = '';

	/**
	 * @var string
	 */
	protected $replyTo = '';

	/**
	 * @var int
	 */
	protected $sendingTime = 0;

	/**
	 * @var int
	 */
	protected $lastSendingTime = 0;

	/**
	 * @var boolean
	 */
	protected $isBlacklisted = FALSE;

	/**
	 * @return string
	 */
	public function getMailSubject() {
		return $this->mailSubject;
	}

	/**
	 * @param string $mailSubject
	 * @return void
	 */
	public function setMailSubject($mailSubject) {
		$this->mailSubject = $mailSubject;
	}

	/**
	 * @return string
	 */
	public function getMailBody() {
		return $this->mailBody;
	}

	/**
	 * @param string $mailBody
	 * @return void
	 */
	public function setMailBody($mailBody) {
		$this->mailBody = $mailBody;
	}

	/**
	 * @return string
	 */
	public function getToAddress() {
		return $this->toAddress;
	}

	/**
	 * @param string $toAddress
	 * @return void
	 */
	public function setToAddress($toAddress) {
		$this->toAddress = $toAddress;
	}

	/**
	 * @return string
	 */
	public function getFromAddress() {
		return $this->fromAddress;
	}

	/**
	 * @param string $fromAddress
	 * @return void
	 */
	public function setFromAddress($fromAddress) {
		$this->fromAddress = $fromAddress;
	}

	/**
	 * @return int
	 */
	public function getPriority() {
		return $this->priority;
	}

	/**
	 * @param int $priority
	 * @return void
	 */
	public function setPriority($priority) {
		$this->priority = (int) $priority;
	}

	/**
	 * @return string
	 */
	public function getBccAddresses() {
		return $this->bccAddresses;
	}

	/**
	 * @param string $bccAddresses
	 */
	public function setBccAddresses($bccAddresses) {
		$this->bccAddresses = $bccAddresses;
	}

	/**
	 * @return string
	 */
	public function getCcAddresses() {
		return $this->ccAddresses;
	}

	/**
	 * @param string $ccAddresses
	 */
	public function setCcAddresses($ccAddresses) {
		$this->ccAddresses = $ccAddresses;
	}

	/**
	 * @return string
	 */
	public function getFromName() {
		return $this->fromName;
	}

	/**
	 * @param string $fromName
	 */
	public function setFromName($fromName) {
		$this->fromName = $fromName;
	}

	/**
	 * @return string
	 */
	public function getExtensionKey() {
		return $this->extensionKey;
	}

	/**
	 * @param string $extensionKey
	 */
	public function setExtensionKey($extensionKey) {
		$this->extensionKey = $extensionKey;
	}

	/**
	 * @return string
	 */
	public function getTemplateName() {
		return $this->templateName;
	}

	/**
	 * @param string $templateName
	 */
	public function setTemplateName($templateName) {
		$this->templateName = $templateName;
	}

	/**
	 * @return string
	 */
	public function getReplyTo() {
		return $this->replyTo;
	}

	/**
	 * @param string $replyTo
	 */
	public function setReplyTo($replyTo) {
		$this->replyTo = $replyTo;
	}

	/**
	 * @return int
	 */
	public function getSendingTime() {
		return $this->sendingTime;
	}

	/**
	 * @param int $sendingTime
	 */
	public function setSendingTime($sendingTime) {
		$this->sendingTime = (int) $sendingTime;
	}

	/**
	 * @return int
	 */
	public function getLastSendingTime() {
		return $this->lastSendingTime;
	}

	/**
	 * @param int $sendingTime
	 */
	public function setLastSendingTime($sendingTime) {
		$this->lastSendingTime = (int) $sendingTime;
	}

	/**
	 * @return string
	 */
	public function getLanguage() {
		return $this->language;
	}

	/**
	 * @param string $language
	 */
	public function setLanguage($language) {
		$this->language = $language;
	}

	/**
	 * @return bool
	 */
	public function isBlacklisted() {
		return $this->isBlacklisted;
	}

	/**
	 * @param bool $isBlacklisted
	 */
	public function setIsBlacklisted(bool $isBlacklisted) {
		$this->isBlacklisted = $isBlacklisted;
	}
}