Class Service

Namespace: Concrete\Core\Mail
Located at src/Mail/Service.php

Methods summary

public
public
# reset( )

this method is called by the Loader::helper to clean up the instance of this object resets the class scope variables.

public static
public
# addParameter( string $key, string $val )

Adds a parameter to a mail template.

public StdClass
# addAttachment( Concrete\Core\File\File $fob )

Add attachment to send with an email.

public
# load( string $template, string $pkgHandle = null )

Loads an email template from the /mail/ directory.

public
# setBody( string|false $body )

Manually set the text body of a mail message, typically the body is set in the template + load method.

public
# setSubject( string $subject )

Manually set the message's subject.

public string
# getSubject( )

Returns the message's subject.

public string|false
# getBody( )

Returns the message's text body.

public string|false
# getBodyHTML( )

Returns the message's html body.

public
# setBodyHTML( string|false $html )

manually set the HTML portion of a MIME encoded message, can also be done by setting $bodyHTML in a mail template.

public
# enableMailResponseProcessing( MailImporter $importer, array $data )
protected string
# generateEmailStrings( array $arr )
public
# from( string $email, string $name = null )

Sets the from address on the email about to be sent out.

public
# to( string $email, string $name = null )

Sets to the to email address on the email about to be sent out.

public
# cc( string $email, string $name = null )

Adds an email address to the cc field on the email about to be sent out.

public
# bcc( string $email, string $name = null )

Adds an email address to the bcc field on the email about to be sent out.

public
# replyto( $email, $name = null )
public
# setTesting( boolean $testing )

Set the testing state (if true the email logging never occurs and sending errors will throw an exception)

public boolean
# getTesting( )

Retrieve the testing state

public
# setAdditionalHeaders( array $headers, string $val,… )

Set additional headers

public
# sendMail( boolean $resetData = true )

Sends the email.

Properties summary

protected $headers
#
protected $to
#
protected $replyto
#
protected $cc
#
protected $bcc
#
protected $from
#
protected $data
#
protected $subject
#
protected $attachments
#
protected $template
#
protected $body
#
protected $bodyHTML
#
protected $testing
#