How does one set the Headers for an email sent via the Email class ($this->email->)?
$knowledge++;
I believe one looks in the manual?
http://ellislab.com/codeigniter/user-guide/libraries/email.html
I think “Setting Email Preferences” is what you are looking for, or have I misunderstood?
Code By Jeff
Mahana Messaging Library
Problem with your query? Did you run
$this->db->last_query();
before you came to the forums for help?
jmadsen - 25 September 2010 09:26 AMI believe one looks in the manual? http://ellislab.com/codeigniter/user-guide/libraries/email.html I think “Setting Email Preferences” is what you are looking for, or have I misunderstood?
thanks… i didn’t know that the SERVER CONFIG could do that? btw- your attempt at satire is ALMOST as obnoxious as my questions
Can you explain further? I don’t see how one sets the message headers.
If you need to set your own headers please read the following!
CodeIgniter User Guide - Output Class
InsiteFX
Ceritfied State of CT Computer Programming Teacher. Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.
STOP! Before posting your questions, remember the WWW Golden rule: What did you try? What did you get? What did you expect to get? Input -> Controller | Processing -> Model | Output -> View
STOP! Before posting your questions, remember the WWW Golden rule: What did you try? What did you get? What did you expect to get?
Input -> Controller | Processing -> Model | Output -> View
Yes, but does that work for emails? If so, how does one do that?
The Email Library sends it’s own headers!
You do need o set the config values for it.
Best place to learn is look at the Email class php file.
The userguide doesn’t mention anything about email headers. But I will have a look at the class file itself.
I know it’s a ways back now, but wondering if anyone has made any progress on this, looks like I’ll need to extend the core, or am I missing something?
Greg Guepy - Skattabrain
Here, maybe of value for someone… very simple though…
Place in application/libraries/MY_Email.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');class MY_Email extends CI_Email { public function set_custom_header($header_name='', $header_value = '') { if($header_name=='') { return FALSE; } $this->_set_header($header_name, $header_value); return $this; }}
skattabrain - 23 May 2012 09:04 AMHere, maybe of value for someone… very simple though… Place in application/libraries/MY_Email.php <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');class MY_Email extends CI_Email { public function set_custom_header($header_name='', $header_value = '') { if($header_name=='') { return FALSE; } $this->_set_header($header_name, $header_value); return $this; }}
Thanks. Just realized all my HTML emails were getting destroyed because they weren’t quoted-printable encoded
$this->load->library('email'); $this->email->from('email@email.com', 'Ben Igniter'); $this->email->to($_POST['email']); $this->email->subject('CodeIgniter'); $this->email->message('Sending a test email'); $this->email->send();