Public Member Functions | |
CI_Email ($config=array()) | |
initialize ($config=array()) | |
clear ($clear_attachments=FALSE) | |
from ($from, $name= '') | |
reply_to ($replyto, $name= '') | |
to ($to) | |
cc ($cc) | |
bcc ($bcc, $limit= '') | |
subject ($subject) | |
message ($body) | |
attach ($filename, $disposition= 'attachment') | |
_set_header ($header, $value) | |
_str_to_array ($email) | |
set_alt_message ($str= '') | |
set_mailtype ($type= 'text') | |
set_wordwrap ($wordwrap=TRUE) | |
set_protocol ($protocol= 'mail') | |
set_priority ($n=3) | |
set_newline ($newline="\n") | |
set_crlf ($crlf="\n") | |
_set_boundaries () | |
_get_message_id () | |
_get_protocol ($return=TRUE) | |
_get_encoding ($return=TRUE) | |
_get_content_type () | |
_set_date () | |
_get_mime_message () | |
validate_email ($email) | |
valid_email ($address) | |
clean_email ($email) | |
_get_alt_message () | |
word_wrap ($str, $charlim= '') | |
_build_headers () | |
_write_headers () | |
_build_message () | |
_prep_quoted_printable ($str, $charlim= '') | |
_prep_q_encoding ($str, $from=FALSE) | |
send () | |
batch_bcc_send () | |
_unwrap_specials () | |
_remove_nl_callback ($matches) | |
_spool_email () | |
_send_with_mail () | |
_send_with_sendmail () | |
_send_with_smtp () | |
_smtp_connect () | |
_send_command ($cmd, $data= '') | |
_smtp_authenticate () | |
_send_data ($data) | |
_get_smtp_data () | |
_get_hostname () | |
_get_ip () | |
print_debugger () | |
_set_error_message ($msg, $val= '') | |
_mime_types ($ext="") | |
Public Attributes | |
$useragent = "CodeIgniter" | |
$mailpath = "/usr/sbin/sendmail" | |
$protocol = "mail" | |
$smtp_host = "" | |
$smtp_user = "" | |
$smtp_pass = "" | |
$smtp_port = "25" | |
$smtp_timeout = 5 | |
$wordwrap = TRUE | |
$wrapchars = "76" | |
$mailtype = "text" | |
$charset = "utf-8" | |
$multipart = "mixed" | |
$alt_message = '' | |
$validate = FALSE | |
$priority = "3" | |
$newline = "\n" | |
$crlf = "\n" | |
$send_multipart = TRUE | |
$bcc_batch_mode = FALSE | |
$bcc_batch_size = 200 | |
$_safe_mode = FALSE | |
$_subject = "" | |
$_body = "" | |
$_finalbody = "" | |
$_alt_boundary = "" | |
$_atc_boundary = "" | |
$_header_str = "" | |
$_smtp_connect = "" | |
$_encoding = "8bit" | |
$_IP = FALSE | |
$_smtp_auth = FALSE | |
$_replyto_flag = FALSE | |
$_debug_msg = array() | |
$_recipients = array() | |
$_cc_array = array() | |
$_bcc_array = array() | |
$_headers = array() | |
$_attach_name = array() | |
$_attach_type = array() | |
$_attach_disp = array() | |
$_protocols = array('mail', 'sendmail', 'smtp') | |
$_base_charsets = array('us-ascii', 'iso-2022-') | |
$_bit_depths = array('7bit', '8bit') | |
$_priorities = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)') |
CI_Email::_build_headers | ( | ) |
Build final headers
private
string |
CI_Email::_build_message | ( | ) |
Build Final Body and attachments
private
CI_Email::_get_alt_message | ( | ) |
Build alternative plain text message
This function provides the raw message for use in plain-text headers of HTML-formatted emails. If the user hasn't specified his own alternative message it creates one by stripping the HTML
private
CI_Email::_get_content_type | ( | ) |
Get content type (text/html/attachment)
private
CI_Email::_get_encoding | ( | $ | return = TRUE |
) |
Get Mail Encoding
private
bool |
CI_Email::_get_hostname | ( | ) |
Get Hostname
private
CI_Email::_get_ip | ( | ) |
Get IP
private
CI_Email::_get_message_id | ( | ) |
Get the Message ID
private
CI_Email::_get_mime_message | ( | ) |
Mime message
private
CI_Email::_get_protocol | ( | $ | return = TRUE |
) |
Get Mail Protocol
private
bool |
CI_Email::_get_smtp_data | ( | ) |
Get SMTP data
private
CI_Email::_mime_types | ( | $ | ext = "" |
) |
Mime Types
private
string |
CI_Email::_prep_q_encoding | ( | $ | str, | |
$ | from = FALSE | |||
) |
Prep Q Encoding
Performs "Q Encoding" on a string for use in email headers. It's related but not identical to quoted-printable, so it has its own method
public
str | ||
bool | // set to TRUE for processing From: headers |
CI_Email::_prep_quoted_printable | ( | $ | str, | |
$ | charlim = '' | |||
) |
Prep Quoted Printable
Prepares string for Quoted-Printable Content-Transfer-Encoding Refer to RFC 2045 http://www.ietf.org/rfc/rfc2045.txt
private
string | ||
integer |
CI_Email::_remove_nl_callback | ( | $ | matches | ) |
Strip line-breaks via callback
private
CI_Email::_send_command | ( | $ | cmd, | |
$ | data = '' | |||
) |
Send SMTP command
private
string | ||
string |
CI_Email::_send_data | ( | $ | data | ) |
Send SMTP data
private
CI_Email::_send_with_mail | ( | ) |
Send using mail()
private
CI_Email::_send_with_sendmail | ( | ) |
Send using Sendmail
private
CI_Email::_send_with_smtp | ( | ) |
Send using SMTP
private
CI_Email::_set_boundaries | ( | ) |
Set Message Boundary
private
CI_Email::_set_date | ( | ) |
Set RFC 822 Date
private
CI_Email::_set_error_message | ( | $ | msg, | |
$ | val = '' | |||
) |
Set Message
private
string |
CI_Email::_set_header | ( | $ | header, | |
$ | value | |||
) |
Add a Header Item
private
string | ||
string |
CI_Email::_smtp_authenticate | ( | ) |
SMTP Authenticate
private
CI_Email::_smtp_connect | ( | ) |
SMTP Connect
private
string |
CI_Email::_spool_email | ( | ) |
Spool mail to the mail server
private
CI_Email::_str_to_array | ( | $ | ) |
Convert a String to an Array
private
string |
CI_Email::_unwrap_specials | ( | ) |
Unwrap special elements
private
CI_Email::_write_headers | ( | ) |
Write Headers as a string
private
CI_Email::attach | ( | $ | filename, | |
$ | disposition = 'attachment' | |||
) |
Assign file attachments
public
string |
CI_Email::batch_bcc_send | ( | ) |
Batch Bcc Send. Sends groups of BCCs in batches
public
CI_Email::bcc | ( | $ | bcc, | |
$ | limit = '' | |||
) |
Set BCC
public
string | ||
string |
CI_Email::cc | ( | $ | cc | ) |
Set CC
public
string |
CI_Email::CI_Email | ( | $ | config = array() |
) |
Constructor - Sets Email Preferences
The constructor can be passed an array of config values
CI_Email::clean_email | ( | $ | ) |
Clean Extended Email Address: Joe Smith <[email protected]>
public
string |
CI_Email::clear | ( | $ | clear_attachments = FALSE |
) |
Initialize the Email Data
public
CI_Email::from | ( | $ | from, | |
$ | name = '' | |||
) |
Set FROM
public
string | ||
string |
CI_Email::initialize | ( | $ | config = array() |
) |
Initialize preferences
public
array |
CI_Email::message | ( | $ | body | ) |
Set Body
public
string |
CI_Email::print_debugger | ( | ) |
Get Debug Message
public
CI_Email::reply_to | ( | $ | replyto, | |
$ | name = '' | |||
) |
Set Reply-to
public
string | ||
string |
CI_Email::send | ( | ) |
Send Email
public
CI_Email::set_alt_message | ( | $ | str = '' |
) |
Set Multipart Value
public
string |
CI_Email::set_crlf | ( | $ | crlf = "\n" |
) |
Set CRLF
public
string |
CI_Email::set_mailtype | ( | $ | type = 'text' |
) |
Set Mailtype
public
string |
CI_Email::set_newline | ( | $ | newline = "\n" |
) |
Set Newline Character
public
string |
CI_Email::set_priority | ( | $ | n = 3 |
) |
Set Priority
public
integer |
CI_Email::set_protocol | ( | $ | protocol = 'mail' |
) |
Set Protocol
public
string |
CI_Email::set_wordwrap | ( | $ | wordwrap = TRUE |
) |
Set Wordwrap
public
string |
CI_Email::subject | ( | $ | subject | ) |
Set Email Subject
public
string |
CI_Email::to | ( | $ | to | ) |
Set Recipients
public
string |
CI_Email::valid_email | ( | $ | address | ) |
Email Validation
public
string |
CI_Email::validate_email | ( | $ | ) |
Validate Email Address
public
string |
CI_Email::word_wrap | ( | $ | str, | |
$ | charlim = '' | |||
) |
Word Wrap
public
string | ||
integer |
CI_Email::$_alt_boundary = "" |
CI_Email::$_atc_boundary = "" |
CI_Email::$_attach_disp = array() |
CI_Email::$_attach_name = array() |
CI_Email::$_attach_type = array() |
CI_Email::$_base_charsets = array('us-ascii', 'iso-2022-') |
CI_Email::$_bcc_array = array() |
CI_Email::$_bit_depths = array('7bit', '8bit') |
CI_Email::$_body = "" |
CI_Email::$_cc_array = array() |
CI_Email::$_debug_msg = array() |
CI_Email::$_encoding = "8bit" |
CI_Email::$_finalbody = "" |
CI_Email::$_header_str = "" |
CI_Email::$_headers = array() |
CI_Email::$_IP = FALSE |
CI_Email::$_priorities = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)') |
CI_Email::$_protocols = array('mail', 'sendmail', 'smtp') |
CI_Email::$_recipients = array() |
CI_Email::$_replyto_flag = FALSE |
CI_Email::$_safe_mode = FALSE |
CI_Email::$_smtp_auth = FALSE |
CI_Email::$_smtp_connect = "" |
CI_Email::$_subject = "" |
CI_Email::$alt_message = '' |
CI_Email::$bcc_batch_mode = FALSE |
CI_Email::$bcc_batch_size = 200 |
CI_Email::$charset = "utf-8" |
CI_Email::$crlf = "\n" |
CI_Email::$mailpath = "/usr/sbin/sendmail" |
CI_Email::$mailtype = "text" |
CI_Email::$multipart = "mixed" |
CI_Email::$newline = "\n" |
CI_Email::$priority = "3" |
CI_Email::$protocol = "mail" |
CI_Email::$send_multipart = TRUE |
CI_Email::$smtp_host = "" |
CI_Email::$smtp_pass = "" |
CI_Email::$smtp_port = "25" |
CI_Email::$smtp_timeout = 5 |
CI_Email::$smtp_user = "" |
CI_Email::$useragent = "CodeIgniter" |
CI_Email::$validate = FALSE |
CI_Email::$wordwrap = TRUE |
CI_Email::$wrapchars = "76" |