summaryrefslogtreecommitdiffstats
path: root/lib/private/Mail
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-10-19 11:05:47 +0200
committerJoas Schilling <coding@schilljs.com>2017-10-19 11:05:47 +0200
commitdcb322a6b330b7bd797f8a9faf63114129c56f75 (patch)
tree38c70a625dbb594e113cd09009733910bbb8c6bc /lib/private/Mail
parentce27e8cf34daea23117a9e5e0134957889aac332 (diff)
downloadnextcloud-server-dcb322a6b330b7bd797f8a9faf63114129c56f75.tar.gz
nextcloud-server-dcb322a6b330b7bd797f8a9faf63114129c56f75.zip
Extend the API with teh parameters from Swift
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Mail')
-rw-r--r--lib/private/Mail/Message.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php
index 35c2c2d84ea..7b198e91b36 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -45,11 +45,24 @@ class Message implements IMessage {
}
/**
+ * @param string $data
+ * @param string $filename
+ * @param string $contentType
+ * @return IAttachment
+ * @since 13.0.0
+ */
+ public function createAttachment($data = null, $filename = null, $contentType = null) {
+ return new Attachment(\Swift_Attachment::newInstance($data, $filename, $contentType));
+ }
+
+ /**
+ * @param string $path
+ * @param string $contentType
* @return IAttachment
* @since 13.0.0
*/
- public function createAttachment() {
- return new Attachment(\Swift_Attachment::newInstance());
+ public function createAttachmentFromPath($path, $contentType = null) {
+ return new Attachment(\Swift_Attachment::fromPath($path, $contentType));
}
/**