Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions lib/private/Mail/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@ public function getBcc(): array {
return $this->bcc;
}

/**
* Set the subject of this message.
*
* @return $this
*/
public function setSubject(string $subject): IMessage {
$this->symfonyEmail->subject($subject);
return $this;
Expand All @@ -224,10 +219,6 @@ public function getSubject(): string {
return $this->symfonyEmail->getSubject() ?? '';
}

/**
* Set the plain-text body of this message.
* @return $this
*/
public function setPlainBody(string $body): IMessage {
$this->symfonyEmail->text($body);
return $this;
Expand All @@ -242,10 +233,6 @@ public function getPlainBody(): string {
return $body;
}

/**
* Set the HTML body of this message. Consider also sending a plain-text body instead of only an HTML one.
* @return $this
*/
public function setHtmlBody(string $body): IMessage {
if (!$this->plainTextOnly) {
$this->symfonyEmail->html($body);
Expand Down
30 changes: 30 additions & 0 deletions lib/public/Mail/IMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,36 @@
* @since 13.0.0
*/
interface IMessage {
/**
* Set the subject of this message
*
* @param string $subject
*
* @return self
* @since 28.0.0
*/
public function setSubject(string $subject): IMessage;

/**
* Set the plain-text body of this message
*
* @param string $body
*
* @return self
* @since 28.0.0
*/
public function setPlainBody(string $body): IMessage;

/**
* Set the HTML body of this message. Consider also sending a plain-text body instead of only an HTML one.
*
* @param string $body
*
* @return self
* @since 28.0.0
*/
public function setHtmlBody(string $body): IMessage;

/**
* @param IAttachment $attachment
* @return IMessage
Expand Down