| Newsgroups |
php.pear.bugs |
| Message-ID |
<[email protected]> |
Edit report at https://pear.php.net/bugs/bug.php?id=21027&edit=1
ID: 21027
Comment by: [email protected]
Reported By: jacob dot alvarez at gmail dot com
Summary: Support calendar body along with attachments and html
images
Status: Open
Type: Feature/Change Request
Package: Mail_Mime
Package Version: 1.10.0
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
Work in progress:
https://github.com/jacalben/Mail_Mime/tree/calendar_with_attachments
Previous Comments:
------------------------------------------------------------------------
[2016-02-12 06:16:29] jacalben
I will be proposing a pull request with the changes in next days.
------------------------------------------------------------------------
[2016-02-12 06:14:01] jacalben
Description:
------------
Current implementation does not support generating emails with calendar
parts along with attachments or html parts with html images. This
prevents
to generate emails similar to the ones generated by Gmail or other third
party calendar services.
Improve current calendar support will enable Mail_Mime users to have
more
alternatives to send more complete and interoperable email invites.
Test script:
---------------
// Calendar and other alternatives along with attachments
$mime = new Mail_mime();
$mime->setTXTBody('test);
$mime->setHTMLBody('<div>test</div>);
$mime->setCalendarBody("calendar test");
$mime->addAttachment("test", 'application/octec-stream', 'attachment',
false);
$headers = $mime->headers();
$body = $mime->get();
// Same example, but including html images
$mime = new Mail_mime();
$mime->setTXTBody('test);
$mime->setHTMLBody('<div>test</div>);
$mime->addHTMLImage('test, 'image/gif', "test.gif", false);
$mime->setCalendarBody("calendar test");
$mime->addAttachment("test", 'application/octec-stream', 'attachment',
false);
$headers = $mime->headers();
$body = $mime->get();
Expected result:
----------------
First script should generate an email with the following part
structure:
Content-Type: multipart/mixed
--Content-Type: multipart/alternative
----Content-Type: text/plain
----Content-Type: text/html
----Content-Type: text/calendar
--Content-Type: application/octec-stream
Second script should generate an email with the following structure:
Content-Type: multipart/mixed
--Content-Type: multipart/alternative
----Content-Type: text/plain
----Content-Type: multipart/related
------Content-Type:text/html
------Content-Type:image/gif
----Content-Type: text/calendar
--Content-Type: application/octec-stream
Actual result:
--------------
Calendar body is not being appended to the email body.
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=21027&edit=1