MailerInterface

Provides a common interface to send emails with.

since

4.4.0

package

Joomla CMS

Methods

addAttachment

Add file attachment to the email.

addAttachment( data,  name = '',  encoding = 'base64',  type = 'application/octet-stream') : 
since

4.4.0

Arguments

data

stringThe data of the attachment

name

stringThe name of the attachment

encoding

stringThe encoding of the attachment

type

stringThe mime type of the attachment

Response

void

addBcc

Add a blind carbon copy recipient to the email.

addBcc( bccEmail,  name = '') : 
since

4.4.0

throws

UnexpectedValueExceptionif the BCC is not a valid address

Arguments

bccEmail

stringThe email of the BCC recipient

name

stringThe name of the BCC recipient

Response

void

addCc

Add a carbon copy recipient to the email.

addCc( ccEmail,  name = '') : 
since

4.4.0

throws

UnexpectedValueExceptionif the CC is not a valid address

Arguments

ccEmail

stringThe email of the CC recipient

name

stringThe name of the CC recipient

Response

void

addRecipient

Add a recipient to the email.

addRecipient( recipientEmail,  name = '') : 
since

4.4.0

throws

UnexpectedValueExceptionif the recipient is not a valid address

Arguments

recipientEmail

stringThe email of the recipient

name

stringThe name of the recipient

Response

void

addReplyTo

Add Reply to email address to the email

addReplyTo( replyToEmail,  name = '') : 
since

4.4.0

throws

UnexpectedValueExceptionif the replay to is not a valid address

Arguments

replyToEmail

stringThe email of the reply address

name

stringThe name of the reply address

Response

void

send

Send the mail. Throws an exception when something goes wrong.

send() : 
since

4.4.0

throws

RuntimeException

Response

void

setBody

Set the email body.

setBody( content) : 
since

4.4.0

Arguments

content

stringBody of the email

Response

void

setSender

Set the email sender.

setSender( fromEmail,  name = '') : 
since

4.4.0

throws

UnexpectedValueExceptionif the sender is not a valid address

Arguments

fromEmail

stringThe Email address of the sender

name

stringThe name of the sender

Response

void

setSubject

Set the email subject.

setSubject( subject) : 
since

4.4.0

Arguments

subject

stringSubject of the email

Response

void