Posts

Showing posts with the label email

How To Ship E-Mail Alongside An Attachment Inwards Codeigniter?

You involve to utilization next ii CodeIgniter's robust classes. 1. Email Library : CodeIgniter's robust Email Class library to brand sending e-mail real elementary too easy. 2. Path Helper : The Path Helper file contains functions that permits you lot to piece of occupation amongst file paths on the server. Here is a basic event demonstrating how you lot mightiness shipping e-mail amongst attachment. Note: This event assumes you lot are sending the e-mail from 1 of your controllers. $this->load->library('email'); $this->load->helper('path'); $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 e-mail class.'); /* This share volition furnish ...

How To Ship Electronic Mail To Multiple Recipients Alongside Attachments Using Codeigniter ?

Sending e-mail is real elementary inward Codeigniter. The next slice of code volition e-mail amongst attachments to all recipients at once. It volition preclude showing all recipients address inward email, too volition e-mail it separately for each recipient. //loading necessary helper classes $this->load->library('email'); $this->load->helper('path'); $this->load->helper('directory'); //setting path to attach files $path = set_realpath('assets/your_folder/'); $file_names = directory_map($path); foreach ($list every mo $name => $address) { //if yous prepare the parameter to TRUE whatever attachments volition hold upwards cleared likewise $this->email->clear(TRUE); $this->email->to($address); $this->email->from('your@example.com'); $this->email->subject('Here is your information '.$name); $this->email->message('Hi '.$name.' Here is the informatio...