CI_Encrypt::decode()

decode($string[, $key = '']) Parameters: $string (string) – String to decrypt $key (string) – Encryption key Returns: Plain-text string Return type: string Decrypts an encoded string. Example: $encrypted_string = 'APANtByIGI1BpVXZTJgcsAG8GZl8pdwwa84'; $plaintext_string = $this->encrypt->decode($encrypted_string); You can optionally pass your encryption key via the second parameter if you don’t want to use the one in your config file: $msg = 'My secret message'; $key = 'supe

CI_Encrypt

class CI_Encrypt encode($string[, $key = '']) Parameters: $string (string) – Data to encrypt $key (string) – Encryption key Returns: Encrypted string Return type: string Performs the data encryption and returns it as a string. Example: $msg = 'My secret message'; $encrypted_string = $this->encrypt->encode($msg); You can optionally pass your encryption key via the second parameter if you don’t want to use the one in your config file: $msg = 'My secret message'; $key = 'supe

CI_Email::to()

to($to) Parameters: $to (mixed) – Comma-delimited string or an array of e-mail addresses Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the email address(s) of the recipient(s). Can be a single e-mail, a comma-delimited list or an array: $this->email->to('[email protected]'); $this->email->to('[email protected], [email protected], [email protected]'); $this->email->to( array('[email protected]', '[email protected]', '[email protec

CI_Email::subject()

subject($subject) Parameters: $subject (string) – E-mail subject line Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the email subject: $this->email->subject('This is my subject');

CI_Email::set_header()

set_header($header, $value) Parameters: $header (string) – Header name $value (string) – Header value Returns: CI_Email instance (method chaining) Return type: CI_Email Appends additional headers to the e-mail: $this->email->set_header('Header1', 'Value1'); $this->email->set_header('Header2', 'Value2');

CI_Email::set_alt_message()

set_alt_message($str) Parameters: $str (string) – Alternative e-mail message body Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the alternative e-mail message body: $this->email->set_alt_message('This is the alternative message'); This is an optional message string which can be used if you send HTML formatted email. It lets you specify an alternative message with no HTML formatting which is added to the header string for people who do not accept HTML

CI_Email::send()

send([$auto_clear = TRUE]) Parameters: $auto_clear (bool) – Whether to clear message data automatically Returns: TRUE on success, FALSE on failure Return type: bool The e-mail sending method. Returns boolean TRUE or FALSE based on success or failure, enabling it to be used conditionally: if ( ! $this->email->send()) { // Generate error } This method will automatically clear all parameters if the request was successful. To stop this behaviour pass FALSE: if ($this->

CI_Email::reply_to()

reply_to($replyto[, $name = '']) Parameters: $replyto (string) – E-mail address for replies $name (string) – Display name for the reply-to e-mail address Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the reply-to address. If the information is not provided the information in the :meth:from method is used. Example: $this->email->reply_to('[email protected]', 'Your Name');

CI_Email::print_debugger()

print_debugger([$include = array('headers', 'subject', 'body')]) Parameters: $include (array) – Which parts of the message to print out Returns: Formatted debug data Return type: string Returns a string containing any server messages, the email headers, and the email messsage. Useful for debugging. You can optionally specify which parts of the message should be printed. Valid options are: headers, subject, body. Example: // You need to pass FALSE while sending in order for the email

CI_Email::message()

message($body) Parameters: $body (string) – E-mail message body Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the e-mail message body: $this->email->message('This is my message');