0

How do I go about setting custom email headers within cakephp 1.3?

I am trying the following:

$this->Email->headers = array('X-statusID' => $status_id);

But the header does not exist in the email when I read it using PHP IMAP.

Thanks

sluggerdog
  • 843
  • 4
  • 12
  • 35

1 Answers1

2

Based on what I read in the API documentation, it should just be:

$this->Email->header(array('X-statusID' => $status_id));
Adam Taylor
  • 4,691
  • 1
  • 37
  • 38
  • Thanks, I just tried that but that header still didn't come though in the email. – sluggerdog Aug 15 '13 at 03:17
  • Have you tried `$this->Email->__header[] = "X-statusID: $status_id";`? – Adam Taylor Aug 15 '13 at 03:26
  • Hmm... I just tried both methods I provided and both methods worked for me. However, I only checked the headers by using Gmail's "Show original" feature. – Adam Taylor Aug 15 '13 at 03:48
  • Ahh.. I just checked with a gmail email and it too shows up for me. Must be something wrong with the way I am reading the headers. Thanks for your help. – sluggerdog Aug 15 '13 at 04:05