Class

Mail

Package: IO\Mail Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Benoit SAUTEL ben.popeye@phpboost.com Version: PHPBoost 5.2 - last update: 2016 10 24 Since: PHPBoost 3.0 - 2010 03 08 Contributor: Julien BRISWALTER j1.seth@phpboost.com Contributor: Arnaud GENET elenwii@phpboost.com Located at: io/mail/Mail.class.php

This class allows you to send mails without having to deal with the mail headers and parameters.

Methods summary
public
# __construct( )

Builds a Mail subject.

public
# set_sender( string $sender, string $sender_name = self::SENDER_ADMIN )

Sets the mail sender.

public
# set_reply_to( string $reply_to, string $reply_to_name = '' )

Sets the mail to reply to.

public
# add_recipient( string $address, string $name = '' )

Adds a recipient to the list

public
public
# add_cc_recipient( string $address, string $name = '' )

Adds a cc recipient to the list

public
public
# add_bcc_recipient( string $address, string $name = '' )

Adds a bcc recipient to the list

public
public string[string]
# get_recipients( )

Returns a map associating email addresses to the corresponding names (can be empty).

public string[string]
# get_cc_recipients( )

Returns a map associating email addresses to the corresponding names (can be empty).

public string[string]
# get_bcc_recipients( )

Returns a map associating email addresses to the corresponding names (can be empty).

public
# set_subject( string $subject )

Sets the mail subject

public
# set_content( string $content )

The mail content.

public
# set_headers( string $headers )

Sets the headers. Forces them, they won't be generated automatically.

public string
# get_sender_mail( )

Returns the mail address of the sender.

public string
# get_sender_name( )

Returns the mail sender's name.

public string
# get_reply_to_mail( )

Returns the mail address to reply to.

public string
# get_reply_to_name( )

Returns the reply to mail sender's name.

public string
# get_subject( )

Returns the mail subject.

public string
# get_content( )

Returns the mail content.

public
# set_is_html( $is )
public
# is_html( )
Constants summary
string SENDER_ADMIN
# 'admin'
string SENDER_USER
# 'user'
Properties summary
public sting $subject

object of the mail

# ''
public string $content

content of the mail

# ''
public string $sender_mail

Address of the mail sender.

# ''
public string $sender_name

The mail sender name.

# ''
public string $reply_to_mail

Address of the mail to reply to.

# ''
public string $reply_to_name

The reply to mail sender name.

# ''
public The $headers

mail headers.

# ''
public string[] $recipients

Recipients of the mail. If they are more than one, a comma separates their addresses.

# array()
public string[] $cc_recipients

Cc recipients of the mail. If they are more than one, a comma separates their addresses.

# array()
public string[] $bcc_recipients

Bcc recipients of the mail. If they are more than one, a comma separates their addresses.

# array()
public string $is_html

Tells whether the content contains HTML code

# false