#6397: EmailComponent: Sending fails when sendAs === 'both'
-----------------------------------------------------+----------------------
Reporter: dom111 | Owner: jperras
Type: Bug | Status: new
Priority: Medium | Milestone: 1.2.x.x
Component: Components | Version: 1.2 Final
Severity: Major | Resolution:
Keywords: EmailComponent, injection, multipart | Php_version: PHP 5
Cake_version: 8004 2009-01-16 20:15:21Z gwoo |
-----------------------------------------------------+----------------------
Comment (by dom111):
Thanks for getting back to me.
I don't concur that the branch to which I'm referring would only be
reached if the email contains attachments:
{{{
// if not empty attachments, there are some attachments
if (!empty($this->attachments)) {
$this->__createBoundary();
$this->__header[] = 'MIME-Version: 1.0';
$this->__header[] = 'Content-Type: multipart/mixed; boundary="'
. $this->__boundary . '"';
$this->__header[] = 'This part of the E-mail should never be
seen. If';
$this->__header[] = 'you are reading this, consider upgrading
your e-mail';
$this->__header[] = 'client to a MIME-compatible client.';
// else if (attachments must be empty to get here)
} elseif ($this->sendAs === 'text') {
$this->__header[] = 'Content-Type: text/plain; charset=' .
$this->charset;
} elseif ($this->sendAs === 'html') {
$this->__header[] = 'Content-Type: text/html; charset=' .
$this->charset;
// else if (still no attachments...)
} elseif ($this->sendAs === 'both') {
$this->__header[] = 'Content-Type: multipart/alternative;
boundary="alt-' . $this->__boundary . '"';
// $this->__header[] = '';
}
}}}
I apologise if I've misread something there, please let me know if you
still require a 'test case'.
--
Ticket URL: <https://trac.cakephp.org/ticket/6397#comment:4>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---