Reputation: 2787
I have a codeigniter function to send emails.Its working fine,but the only problem is email signature id not adding to my email. I am using gmail to send email. i set email signature in gmail configuration.
How can add email signature in codeigniter?
Upvotes: 1
Views: 1234
Reputation: 11830
You can use views for this
// views/email_message.php
<?php echo $this->load->view('email/message', $message_data(), TRUE) ?>
<?php echo $this->load->view('email/signature', $signature_data(), TRUE) ?>
and then you can pass this to your email message:
// in your controller
$message = $this->load->view('views/email_message', $data(), TRUE);
// configure email options, etc.
...
$this->email->message($message);
// send the email
Upvotes: 1