Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mime type of attachments if present for outgoing emails #1919

Closed
kevin-olbrich opened this issue Apr 4, 2018 · 4 comments
Closed

Use mime type of attachments if present for outgoing emails #1919

kevin-olbrich opened this issue Apr 4, 2018 · 4 comments
Assignees
Milestone

Comments

@kevin-olbrich
Copy link
Contributor

Infos:

  • Used Zammad version: 2.4.0, daily / latest
  • Installation method (source, package, ..): package / repo
  • Operating system: CentOS 7
  • Database + version: -
  • Elasticsearch version: 5.x
  • Browser + version: -

Expected behavior:

  • Setting ["mime-type": "text/calendar;method=REQUEST"] should keep the mime-type

Actual behavior:

  • Setting ["mime-type": "text/calendar;method=REQUEST"] results in:
----==_mimepart_5ac4bc01d4a2b_4ec52ae183bdb5e8196795
Content-Type: application/octet-stream; filename="invite.ics"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="invite.ics"
Content-ID: <5ac4bc01d7ba4_4ec52ae183bdb5e81968dc@example.com.mail>

...content...

----==_mimepart_5ac4bc01d4a2b_4ec52ae183bdb5e8196795--

Steps to reproduce the behavior:

Yes I'm sure this is a bug and no feature request or a general question.

@thorsteneckel
Copy link
Contributor

Hi @kevin-olbrich, could you please post an example request of yours?

@kevin-olbrich
Copy link
Contributor Author

kevin-olbrich commented Apr 4, 2018

Sure, here we go:

URL: "POST /api/v1/ticket_articles/ HTTP/1.1" 201 None

JSON:

{
    "attachments": [
        {
            "data": "base64-encoded-string",
            "filename": "invite.ics",
            "mime-type": "text/calendar;method=REQUEST"
        }
    ],
    "body": "body-text",
    "content_type": "text/plain",
    "internal": false,
    "subject": "Test - Calendar (Calendar-ID 1234)",
    "ticket_id": "8209",
    "to": "ko@example.com",
    "type": "email"
}

base64-encoded-string is a placeholder for the real base64 text.

@muhammadn
Copy link
Contributor

muhammadn commented Apr 4, 2018

@kevin-olbrich It works as expected on my Apple mail. I used a working .ics file which i had encoded to base64 and ran the example you gave (with modification to the to: parameter) and i received the email.

.ics file was not corrupted in this case. Are you having some problem opening the .ics file?

@kevin-olbrich
Copy link
Contributor Author

@muhammadn
I think I need to explain a little more, as the case you have tested, ist not exactly what I have in mind.

Attaching an ics file in my email article is working perfectly (your test case is fine).
What I tried to do, is sending this article as a calendar invitation like you do on Microsoft Exchange.
These e-mails are then shown as calendar invites in Outlook inbox, Google calendar, iPhone, etc.
Using the ics as attachment shows as regular email. Most clients then show that this email also includes an appointment.

An example how to do it in python is located here:
https://stackoverflow.com/questions/4823574/sending-meeting-invitations-with-python

Maybe I got the mime part wrong but zammad does not honor the mime type I specified.

@muhammadn muhammadn added the bug label Apr 16, 2018
@muhammadn muhammadn added this to the 2.4.1 milestone Apr 16, 2018
@thorsteneckel thorsteneckel changed the title API - Mime type for calendar invite Use mime type of attachments if present for outgoing emails Apr 17, 2018
@thorsteneckel thorsteneckel modified the milestones: 2.4.1, 2.5.0 Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants