Summary | Problem with Compose and attachment |
Queue | IMP |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | rsalmon (at) mbpgroup (dot) com |
Created | 11/12/2008 (6079 days ago) |
Due | |
Updated | 12/29/2008 (6032 days ago) |
Assigned | 11/16/2008 (6075 days ago) |
Resolved | 11/16/2008 (6075 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
return base_convert(dechex(strtr(microtime(), array('0.' =>
'', ' ' => ''))) . uniqid(mt_rand(), true), 16, 36);
in git.
groupwares
thanks.
return base_convert(dechex(strtr(microtime(), array('0.' =>
'', ' ' => ''))) . uniqid(mt_rand(), true), 16, 36);
in git.
It comes from MIME::generateRandomID(). The random ID generated is not
uniq. When you call this function several time within a sort period of
time, you always get the same random ID.
quick fix which works here :
function generateRandomID()
{
// return base_convert(dechex(strtr(microtime(), array('0.' =>
'', ' ' => ''))) . uniqid(), 16, 36);
return md5(microtime());
}
hope this helps.
State ⇒ Resolved
Taken from Michael Slusarz
enough to replace the current CVS HEAD code, so I am not going to look
at this. If someone else wants to, they are more than welcome.
Assigned to Michael Slusarz
State ⇒ Assigned
New Attachment: mime_part.patch
It solves the bug we're having.
but the patch creates an other problem : it does add 2 ending boundary
at the end of the email.
--- Compose.php.orig 2008-11-14 11:31:45.000000000 +0100
+++ Compose.php 2008-11-14 11:35:20.000000000 +0100
@@ -856,6 +856,7 @@
}
}
+ Horde::logMessage(print_r($mime_message,true), __FILE__, __LINE__,
PEAR_LOG_ERR);
/* Add the body text to the message string. */
which gives me the following parts of the email :
[_type] => multipart
[_subtype] => mixed
[_parts] => Array
(
[1] => MIME_Part Object
(
[_type] => multipart
[_subtype] => mixed
[_parts] => Array
(
[1] => MIME_Part Object
(
[_type] => multipart
[_subtype] => alternative
[_parts] => Array
(
[1] => MIME_Part Object
(
[_type] => text
[_subtype] => plain
[2] => MIME_Part Object
(
[_type] => text
[_subtype] => html
[2] => MIME_Part Object
(
[_type] => image
[_subtype] => jpeg
I'm guessing the problem is coming from function MIME_Part:::toString.
when toString is called : part 1.1 (so part 1.1.1 and 1.1.2) are
processed and then an ending boundary is added for the first time.
then part 1.2 is processed and an ending boundary is added for the
second time.
Is this correct ?
I can't see the attachment in IMP.
Summary ⇒ Problem with Compose and attachment
New Attachment: email.eml
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Pb with Compose and attachment
Type ⇒ Bug
Priority ⇒ 1. Low
How to reproduce :
compose a new email, add text, add an attachment. and send it.
I've attached a copy of the email that has been sent.
I'm not familiar with boundaries, but it seems that the ending
boundary is added just before the attachment.
I have a CVS copy of horde/IMP from the 07/10/2008, and it was working.