From 7f8f79255830b51bb206658472cb490953f9e839 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 1 Jun 2023 18:07:59 +0200 Subject: feat(ocp): Allow sending emails with subject and body Signed-off-by: Christoph Wurst --- lib/public/Mail/IMessage.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'lib/public/Mail/IMessage.php') diff --git a/lib/public/Mail/IMessage.php b/lib/public/Mail/IMessage.php index b3cc86839f1..f698987c788 100644 --- a/lib/public/Mail/IMessage.php +++ b/lib/public/Mail/IMessage.php @@ -32,6 +32,36 @@ namespace OCP\Mail; * @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 -- cgit v1.2.3