laminas / laminas-mail

Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages
https://docs.laminas.dev/laminas-mail/
BSD 3-Clause "New" or "Revised" License
95 stars 64 forks source link

Use "text/html" content type instead of "multipart/alternative" #230

Open aiboost opened 1 year ago

aiboost commented 1 year ago

Feature Request

Use "text/html" content type instead of "multipart/alternative" [in some cases].

Q A
New Feature yes
RFC yes
BC Break no

Summary

Currently Laminos Mail sends all messages in "multipart/alternative" format that makes them not readable by some e-mail clients. A quote from mail source:

Content-Type: multipart/alternative;
...
This is a message in Mime Format.  If you see this, your mail reader does not support this format.

But some products do not need to send mails with a complicated structure, they need just to send text or HTML messages. Here is the issue description on osTicket forum (they use LM lib): https://forum.osticket.com/d/102563-ya-this-is-a-message-in-mime-format/18

It could be nice if LM uses "text/html" content type as all other SMTP clients do. Maybe not mandatory, but using some option.

Ocramius commented 1 year ago

Briefly looked at the thread over there, and somebody described it as a regression? Could you pinpoint where/when the regression has happened?

aiboost commented 1 year ago

@Ocramius probably this is not a regression. osTicket just started to use LM in June 2022 (they had something totally another before), so some of the users just updated, and some - just installed osTicket from the scratch.

I'm one of those who try to install osTicket, but I just worry that some of the clients will be unable to read e-mail. uvDesk (alternative to osTicket) uses SwiftMail and does not have such issue.

My worry is about some clients won't be able to render non-text/html format in their [probably legacy] e-mail clients. I've read about such stories in the internet, for example here is a complaint about multipart/alternative format can not be rendered in Outlook 2010: https://stackoverflow.com/questions/31502596/php-mail-multipart-mixed-cut-off-outlook-2010.

You know, the problem looks like not too important when some accounter on old PC can not get e-mail, but this is not such fun when this accounter is your accounter :)

Now on the way to understanding how big is the problem...

Ocramius commented 1 year ago

I would expect a reproducer here before acting then: everything else is just words until then :)

cloudseeder commented 1 year ago

I spent a couple of days working on this. It does turn out to be a bug in laminas\mail\transport\sendmail. Everything is documented in this osTicket bug:

https://github.com/osTicket/osTicket/issues/6305

Let me know if you need more.

Neustradamus commented 1 year ago

To follow

RubyRachel commented 1 year ago

I got issues after upload the plugins named swiftmail .Now the website can not open and shows that there are an error in swiftmail/action.php in line 44 .But I can not find the swiftmail plugins under the plugins category and also I have checked all action.php in line44 there were not show [The'new']error.What can I do to fix this bug and open dokuwiki as usual? Please help me thank you.

froschdesign commented 1 year ago

@RubyRachel Unfortunately, you are asking your question in the wrong place, because this bug tracker is not for osTicket or its plugins.