Home › Forums › CodeIgniter › Create and Send Email
Tagged: codeigniter, email, library
- This topic has 0 replies, 1 voice, and was last updated 8 years, 11 months ago by Layer7web.
Viewing 0 reply threads
-
AuthorPosts
-
-
January 11, 2016 at 1:35 pm #2251
Layer7webKeymasterSimple example of creating and sending and email.
This is taken from the codeigniter site here: https://www.codeigniter.com/userguide3/libraries/email.html
Short example of email.PHP1234567891011$this->load->library('email');$this->email->from('your@example.com', 'Your Name');$this->email->to('someone@example.com');$this->email->cc('another@another-example.com');$this->email->bcc('them@their-example.com');$this->email->subject('Email Test');$this->email->message('Testing the email class.');$this->email->send();To set the email preferences.
Setting Email PreferencesPHP123456$config['protocol'] = 'sendmail';$config['mailpath'] = '/usr/sbin/sendmail';$config['charset'] = 'iso-8859-1';$config['wordwrap'] = TRUE;$this->email->initialize($config);- This topic was modified 8 years, 11 months ago by Layer7web.
-
-
AuthorPosts
Viewing 0 reply threads
You must be logged in to reply to this topic.
Comments are closed.