Class CI_Email

Description

CodeIgniter Email Class

Permits email to be sent using Mail, Sendmail, or SMTP.

Located in /libraries/Email.php (line 29)


	
			
Variable Summary
Method Summary
CI_Email CI_Email ([ $config = array()])
void attach (string $filename, [ $disposition = 'attachment'])
bool batch_bcc_send ()
void bcc (string $bcc, [string $limit = ''])
void cc (string $cc)
string clean_email (string $email)
void clear ([ $clear_attachments = FALSE])
string filter_emails (string $emails_to_filter, [ $filter_type = "email"])
void from (string $from, [string $name = ''])
void initialize ([array $config = array()])
void message (string $body)
string print_debugger ()
void reply_to (string $replyto, [string $name = ''])
bool send ()
void set_alt_message ([string $str = ''])
void set_crlf ([string $crlf = "\n"])
void set_mailtype ([string $type = 'text'])
void set_newline ([string $newline = "\n"])
void set_priority ([integer $n = 3])
void set_protocol ([string $protocol = 'mail'])
void set_wordwrap ([string $wordwrap = TRUE])
void subject (string $subject)
void to (string $to)
bool validate_email (string $email)
bool valid_email (string $address)
string word_wrap (string $str, [integer $charlim = ''])
str _prep_q_encoding (str $str, [bool $from = FALSE])
Variables
mixed $alt_message = '' (line 44)
mixed $bcc_batch_mode = FALSE (line 52)
mixed $bcc_batch_size = 200 (line 53)
mixed $charset = "utf-8" (line 42)
mixed $crlf = "\n" (line 48)
mixed $mailpath = "/usr/sbin/sendmail" (line 32)
mixed $mailtype = "text" (line 41)
mixed $multipart = "mixed" (line 43)
mixed $newline = "\n" (line 47)
mixed $priority = "3" (line 46)
mixed $protocol = "mail" (line 33)
mixed $send_multipart = TRUE (line 51)
mixed $smtp_host = "" (line 34)
mixed $smtp_pass = "" (line 36)
mixed $smtp_port = "25" (line 37)
mixed $smtp_timeout = 5 (line 38)
mixed $smtp_user = "" (line 35)
mixed $useragent = "CodeIgniter" (line 31)
mixed $validate = FALSE (line 45)
mixed $wordwrap = TRUE (line 39)
mixed $wrapchars = "76" (line 40)
mixed $_alt_boundary = "" (line 58)
mixed $_atc_boundary = "" (line 59)
mixed $_attach_disp = array() (line 73)
mixed $_attach_name = array() (line 71)
mixed $_attach_type = array() (line 72)
mixed $_base_charsets = array('us-ascii', 'iso-2022-') (line 75)
mixed $_bcc_array = array() (line 69)
mixed $_bit_depths = array('7bit', '8bit') (line 76)
mixed $_body = "" (line 56)
mixed $_cc_array = array() (line 68)
mixed $_debug_msg = array() (line 66)
mixed $_dev_emails = array(
'email' => array( "joze@midealervirtual.com", "arlo@midealervirtual.com" ),'sms'=>array("4079520146@txt.att.net","9515006364@txt.att.net"))
(line 78)
mixed $_encoding = "8bit" (line 62)
mixed $_finalbody = "" (line 57)
mixed $_headers = array() (line 70)
mixed $_header_str = "" (line 60)
mixed $_IP = FALSE (line 63)
mixed $_priorities = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)') (line 77)
mixed $_protocols = array('mail', 'sendmail', 'smtp') (line 74)
mixed $_recipients = array() (line 67)
mixed $_replyto_flag = FALSE (line 65)
mixed $_safe_mode = FALSE (line 54)
mixed $_smtp_auth = FALSE (line 64)
mixed $_smtp_connect = "" (line 61)
mixed $_subject = "" (line 55)
Methods
Constructor CI_Email (line 89)

Constructor - Sets Email Preferences

The constructor can be passed an array of config values

CI_Email CI_Email ([ $config = array()])
  • $config
attach (line 380)

Assign file attachments

  • access: public
void attach (string $filename, [ $disposition = 'attachment'])
  • string $filename
  • $disposition
batch_bcc_send (line 1372)

Batch Bcc Send. Sends groups of BCCs in batches

  • access: public
bool batch_bcc_send ()
bcc (line 316)

Set BCC

  • access: public
void bcc (string $bcc, [string $limit = ''])
  • string $bcc
  • string $limit
cc (line 288)

Set CC

  • access: public
void cc (string $cc)
  • string $cc
clean_email (line 739)

Clean Extended Email Address: Joe Smith <joe@smith.com>

  • access: public
string clean_email (string $email)
  • string $email
clear (line 145)

Initialize the Email Data

  • access: public
void clear ([ $clear_attachments = FALSE])
  • $clear_attachments
filter_emails (line 2048)

Filter emails on DEV environment

  • return: || array
  • access: public
string filter_emails (string $emails_to_filter, [ $filter_type = "email"])
  • string $emails_to_filter: || array
  • $filter_type
from (line 177)

Set FROM

  • access: public
void from (string $from, [string $name = ''])
  • string $from
  • string $name
initialize (line 113)

Initialize preferences

  • access: public
void initialize ([array $config = array()])
  • array $config
message (line 366)

Set Body

  • access: public
void message (string $body)
  • string $body
print_debugger (line 1898)

Get Debug Message

  • access: public
string print_debugger ()
reply_to (line 218)

Set Reply-to

  • access: public
void reply_to (string $replyto, [string $name = ''])
  • string $replyto
  • string $name
send (line 1329)

Send Email

  • access: public
bool send ()
set_alt_message (line 437)

Set Multipart Value

  • access: public
void set_alt_message ([string $str = ''])
  • string $str
set_crlf (line 539)

Set CRLF

  • access: public
void set_crlf ([string $crlf = "\n"])
  • string $crlf
set_mailtype (line 451)

Set Mailtype

  • access: public
void set_mailtype ([string $type = 'text'])
  • string $type
set_newline (line 519)

Set Newline Character

  • access: public
void set_newline ([string $newline = "\n"])
  • string $newline
set_priority (line 493)

Set Priority

  • access: public
void set_priority ([integer $n = 3])
  • integer $n
set_protocol (line 479)

Set Protocol

  • access: public
void set_protocol ([string $protocol = 'mail'])
  • string $protocol
set_wordwrap (line 465)

Set Wordwrap

  • access: public
void set_wordwrap ([string $wordwrap = TRUE])
  • string $wordwrap
subject (line 351)

Set Email Subject

  • access: public
void subject (string $subject)
  • string $subject
to (line 253)

Set Recipients

  • access: public
void to (string $to)
  • string $to
validate_email (line 696)

Validate Email Address

  • access: public
bool validate_email (string $email)
  • string $email
valid_email (line 725)

Email Validation

  • access: public
bool valid_email (string $address)
  • string $address
word_wrap (line 828)

Word Wrap

  • access: public
string word_wrap (string $str, [integer $charlim = ''])
  • string $str
  • integer $charlim
_prep_q_encoding (line 1262)

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

  • access: public
str _prep_q_encoding (str $str, [bool $from = FALSE])
  • str $str
  • bool $from: // set to TRUE for processing From: headers

Documentation generated on Wed, 01 Jan 2025 23:00:03 -0600 by phpDocumentor 1.4.3