CodeIgniter Forums
Email HEADERS with "Email" class - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Email HEADERS with "Email" class (/showthread.php?tid=34276)

Pages: 1 2


Email HEADERS with "Email" class - El Forum - 09-24-2010

[eluser]thesocialhacker[/eluser]
How does one set the Headers for an email sent via the Email class ($this->email->)?


Email HEADERS with "Email" class - El Forum - 09-25-2010

[eluser]jmadsen[/eluser]
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?


Email HEADERS with "Email" class - El Forum - 09-30-2010

[eluser]thesocialhacker[/eluser]
[quote author="jmadsen" date="1285421185"]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?[/quote]

thanks... i didn't know that the SERVER CONFIG could do that? btw- your attempt at satire is ALMOST as obnoxious as my questions Smile


Email HEADERS with "Email" class - El Forum - 01-01-2011

[eluser]CMCDragonkai[/eluser]
Can you explain further? I don't see how one sets the message headers.


Email HEADERS with "Email" class - El Forum - 01-01-2011

[eluser]InsiteFX[/eluser]
If you need to set your own headers please read the following!

CodeIgniter User Guide - Output Class

InsiteFX


Email HEADERS with "Email" class - El Forum - 01-01-2011

[eluser]CMCDragonkai[/eluser]
Yes, but does that work for emails? If so, how does one do that?


Email HEADERS with "Email" class - El Forum - 01-01-2011

[eluser]InsiteFX[/eluser]
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.

InsiteFX


Email HEADERS with "Email" class - El Forum - 01-02-2011

[eluser]CMCDragonkai[/eluser]
The userguide doesn't mention anything about email headers. But I will have a look at the class file itself.


Email HEADERS with "Email" class - El Forum - 05-23-2012

[eluser]skattabrain[/eluser]
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?


Email HEADERS with "Email" class - El Forum - 05-23-2012

[eluser]skattabrain[/eluser]
Here, maybe of value for someone... very simple though...

Place in application/libraries/MY_Email.php

Code:
<?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;
}

}