This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Helper_Mail

Direct known subclasses

MailHelper

Package: Helpers
Copyright: Copyright (c) 2003-2008 Concrete5. (http://www.concrete5.org)
License: MIT License
Author: Andrew Embler andrew@concrete5.org
Located at core/helpers/mail.php

Methods summary

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 array
# getMailerObject( )
public
# addParameter( string $key, string $val )

Adds a parameter to a mail template

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

Loads an email template from the /mail/ directory

public
# setBody( string $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
# getBody( )

Returns the message's text body

public string
# getBodyHTML( )

Returns the message's html body

public
# setBodyHTML( string $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
# sendMail( $resetData = true )

Sends the email

Properties summary

protected array $headers
# array()
protected array $to
# array()
protected array $cc
# array()
protected array $bcc
# array()
protected array $from
# array()
protected array $data
# array()
protected string $subject
# ''
public string $body
# ''
protected string $template
# ''
protected boolean $bodyHTML
# false
protected boolean $testing
# false