Nextcloud PHP API (master)

IMessage

Interface IMessage

Tags
since
13.0.0

Table of Contents

Methods

attach()  : IMessage
attachInline()  : IMessage
Can be used to "attach content inline" as message parts with specific MIME type and encoding.
setAutoSubmitted()  : IMessage
Add the Auto-Submitted header to the email, preventing most automated responses to automated messages.
setBcc()  : IMessage
Set the BCC recipients of this message.
setCc()  : IMessage
Set the CC recipients of this message.
setFrom()  : IMessage
Set the from address of this message.
setHtmlBody()  : self
Set the HTML body of this message. Consider also sending a plain-text body instead of only an HTML one.
setPlainBody()  : self
Set the plain-text body of this message
setReplyTo()  : IMessage
Set the Reply-To address of this message
setSubject()  : self
Set the subject of this message
setTo()  : IMessage
Set the to addresses of this message.
useTemplate()  : IMessage

Methods

attachInline()

Can be used to "attach content inline" as message parts with specific MIME type and encoding.

public attachInline(string $body, string $name[, string|null $contentType = null ]) : IMessage
Parameters
$body : string

body of the MIME part

$name : string

the file name

$contentType : string|null = null

MIME Content-Type (e.g. text/plain or text/calendar)

Tags
since
27.0.0
Return values
IMessage

setAutoSubmitted()

Add the Auto-Submitted header to the email, preventing most automated responses to automated messages.

public setAutoSubmitted(AutoSubmitted::VALUE_* $value) : IMessage
Parameters
$value : AutoSubmitted::VALUE_*

(one of AutoSubmitted::VALUE_NO, AutoSubmitted::VALUE_AUTO_GENERATED, AutoSubmitted::VALUE_AUTO_REPLIED)

Tags
since
26.0.0
Return values
IMessage

setBcc()

Set the BCC recipients of this message.

public setBcc(array<string|int, mixed> $recipients) : IMessage
Parameters
$recipients : array<string|int, mixed>

Example: array('recipient@domain.org', 'other@domain.org' => 'A name')

Tags
since
13.0.0
Return values
IMessage

setCc()

Set the CC recipients of this message.

public setCc(array<string|int, mixed> $recipients) : IMessage
Parameters
$recipients : array<string|int, mixed>

Example: array('recipient@domain.org', 'other@domain.org' => 'A name')

Tags
since
13.0.0
Return values
IMessage

setFrom()

Set the from address of this message.

public setFrom(array<string|int, mixed> $addresses) : IMessage

If no "From" address is used \OC\Mail\Mailer will use mail_from_address and mail_domain from config.php

Parameters
$addresses : array<string|int, mixed>

Example: array('sender@domain.org', 'other@domain.org' => 'A name')

Tags
since
13.0.0
Return values
IMessage

setHtmlBody()

Set the HTML body of this message. Consider also sending a plain-text body instead of only an HTML one.

public setHtmlBody(string $body) : self
Parameters
$body : string
Tags
since
28.0.0
Return values
self

setPlainBody()

Set the plain-text body of this message

public setPlainBody(string $body) : self
Parameters
$body : string
Tags
since
28.0.0
Return values
self

setReplyTo()

Set the Reply-To address of this message

public setReplyTo(array<string|int, mixed> $addresses) : IMessage
Parameters
$addresses : array<string|int, mixed>
Tags
since
13.0.0
Return values
IMessage

setSubject()

Set the subject of this message

public setSubject(string $subject) : self
Parameters
$subject : string
Tags
since
28.0.0
Return values
self

setTo()

Set the to addresses of this message.

public setTo(array<string|int, mixed> $recipients) : IMessage
Parameters
$recipients : array<string|int, mixed>

Example: array('recipient@domain.org', 'other@domain.org' => 'A name')

Tags
since
13.0.0
Return values
IMessage

        
On this page

Search results