Re: [CakePHP : The Rapid Development Framework for PHP] #4932: mail component no boundary with sandAs=both

2009-10-21 Thread CakePHP : The Rapid Development Framework for PHP
#4932: mail component no boundary with sandAs=both
---+
Reporter:  stefanski   | Owner:  
Type:  Bug |Status:  closed  
Priority:  Medium  | Milestone:  1.2.x.x 
   Component:  Components  |   Version:  RC1 
Severity:  Normal  |Resolution:  needmoreinfo
Keywords:  |   Php_version:  n/a 
Cake_version:  |  
---+
Comment (by bato):

 I can confirm this bug.

 Sending an email in "both" mode dosen't create boundary. When create mail
 headers in {{{__createHeader()}}} method you can see

 {{{
 } elseif ($this->sendAs === 'both') {
 $prefix[] = 'Content-Type: multipart/alternative; boundary="alt-' .
 $this->__boundary . '"';
 }
 }}}

 but {{{$this->__boundary}}} is generated only {{{if
 (!empty($this->attachments))}}}.

 It should be:

 {{{
 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.';
 } 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;
 } elseif ($this->sendAs === 'both') {
 $this->__createBoundary();
 $this->__header[] = 'Content-Type: multipart/alternative;
 boundary="alt-' . $this->__boundary . '"';
 }
 }}}

 This fix it.

-- 
Ticket URL: 
CakePHP : The Rapid Development Framework for PHP 
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #4932: mail component no boundary with sandAs=both

2009-09-21 Thread CakePHP : The Rapid Development Framework for PHP
#4932: mail component no boundary with sandAs=both
---+
Reporter:  stefanski   | Owner:  
Type:  Bug |Status:  closed  
Priority:  Medium  | Milestone:  1.2.x.x 
   Component:  Components  |   Version:  RC1 
Severity:  Normal  |Resolution:  needmoreinfo
Keywords:  |   Php_version:  n/a 
Cake_version:  |  
---+
Comment (by nescha):

 Of course, some of the code can and should be moved to:
 {{{
 function __formatMessage($message) {
 if (!empty($this->attachments)) {
 $prefix = array(
 '--' . $this->__boundary,
 'Content-Type: text/plain; charset=' .
 $this->charset,
 'Content-Transfer-Encoding: 7bit',
 ''
 );
 $message = array_merge($prefix, $message);
 } elseif ($this->sendAs === 'both') {
 $prefix = array('--' . $this->__boundary);
 $message = array_merge($prefix, $message);
 }
 return $message;
 }
 }}}

-- 
Ticket URL: 
CakePHP : The Rapid Development Framework for PHP 
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #4932: mail component no boundary with sandAs=both

2009-09-21 Thread CakePHP : The Rapid Development Framework for PHP
#4932: mail component no boundary with sandAs=both
---+
Reporter:  stefanski   | Owner:  
Type:  Bug |Status:  closed  
Priority:  Medium  | Milestone:  1.2.x.x 
   Component:  Components  |   Version:  RC1 
Severity:  Normal  |Resolution:  needmoreinfo
Keywords:  |   Php_version:  n/a 
Cake_version:  |  
---+
Comment (by nescha):

 Branch "both" requires full code like for attachment:
 {{{
 ...
 } elseif ($this->sendAs === 'both') {
 $this->__createBoundary();
 $this->__header[] = 'MIME-Version: 1.0';
 $this->__header[] = 'Content-Type:
 multipart/related; boundary="' . $this->__boundary . '"';
 $this->__header[] = 'This message is in MIME
 format. Since your mail reader does not understand this format, some or
 all of this message may not be legible.';
 $this->__header[] = '--' . $this->__boundary;
 $this->__header[] = 'Content-Type:
 multipart/alternative; boundary="alt-' . $this->__boundary . '"';
 $this->__header[] = '';
 }
 ...
 }}}

 Of course, some of the code can and should be moved to __formatMessage()
 function (i.e. "'--' . $this->__boundary")

-- 
Ticket URL: 
CakePHP : The Rapid Development Framework for PHP 
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #4932: mail component no boundary with sandAs=both

2009-04-22 Thread CakePHP : The Rapid Development Framework for PHP
#4932: mail component no boundary with sandAs=both
---+
Reporter:  stefanski   | Owner:  
Type:  Bug |Status:  closed  
Priority:  Medium  | Milestone:  1.2.x.x 
   Component:  Components  |   Version:  RC1 
Severity:  Normal  |Resolution:  needmoreinfo
Keywords:  |   Php_version:  n/a 
Cake_version:  |  
---+
Changes (by gwoo):

  * status:  reopened => closed
  * resolution:  => needmoreinfo

Comment:

 the patch causes several tests to fail. Please explain why the tests are
 wrong and provide sufficient examples to create further test cases.

-- 
Ticket URL: 
CakePHP : The Rapid Development Framework for PHP 
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #4932: mail component no boundary with sandAs=both

2009-04-10 Thread CakePHP : The Rapid Development Framework for PHP
#4932: mail component no boundary with sandAs=both
---+
Reporter:  stefanski   | Owner:  
Type:  Bug |Status:  reopened
Priority:  Medium  | Milestone:  1.2.x.x 
   Component:  Components  |   Version:  RC1 
Severity:  Normal  |Resolution:  
Keywords:  |   Php_version:  n/a 
Cake_version:  |  
---+
Comment (by odeland):

 It should be added that some mail clients (tested with Gmail) will still
 show the email correctly, but other mail clients (tested with
 SquirrelMail) will render the whole email (both parts) as text only.

-- 
Ticket URL: 
CakePHP : The Rapid Development Framework for PHP 
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #4932: mail component no boundary with sandAs=both

2009-04-10 Thread CakePHP : The Rapid Development Framework for PHP
#4932: mail component no boundary with sandAs=both
---+
Reporter:  stefanski   | Owner:  
Type:  Bug |Status:  reopened
Priority:  Medium  | Milestone:  1.2.x.x 
   Component:  Components  |   Version:  RC1 
Severity:  Normal  |Resolution:  
Keywords:  |   Php_version:  n/a 
Cake_version:  |  
---+
Changes (by odeland):

  * status:  closed => reopened
  * resolution:  needmoreinfo =>

Comment:

 This bug is still not fixed in the latest release. I attached a patch to
 fix the problem when sending emails as 'both' html and text, without any
 attachments.

 As you can see from the code (taken from trunk r.8120),
 {{{$this->__boundary}}} is used in the header string without calling
 {{{$this->__createBoundary();}}} first.


 {{{
 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.';
 } 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;
 } elseif ($this->sendAs === 'both') {
 $this->__header[] = 'Content-Type:
 multipart/alternative; boundary="alt-' . $this->__boundary . '"';
 $this->__header[] = '';
 }
 }}}

-- 
Ticket URL: 
CakePHP : The Rapid Development Framework for PHP 
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---