Answers.Body: <p>Regarding the ".unknown", you can update the list of extensions it recognizes at Administer - System Settings - Safe File Extensions.</p>
  
  <p>Regarding the rest that isn't how it used to work. Not sure if something's changed recently or maybe there is something unusual about those emails. You say it's both html and plain - are all the emails coming from the same source or different types of sources, e.g. MS Exchange, gmail, etc.</p>
  
  <p>UPDATE: <a href="https://lab.civicrm.org/dev/core/issues/940" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/issues/940</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-06T15:17:08.800Z
Answers.Text: Thank you for your extremely quick response! Just to clarify: The .unknown extension is the name/extension of the activity attachment, which contains the incoming mail. It gets created by civi, which then attaches it to the newly created activity. The email as such does not contain any attachment. Therefore, I don't think the safe file extension can help.
  I tried to send test mails from various addresses. They got created with Thunderbird, so nothing fancy.
Answers.UserDisplayName: Joachim
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-06T15:28:50.553Z
Answers.Text: I mean .unknown is what civi puts when it sees an attachment that isn't in that list, so if it thinks it's ".eml" for example, it would put ".unknown" if that isn't in the list. Although you say there is no attachment. (Except technically there is no difference between mime parts and attachments, so even html can be considered an "attachment" depending how the email is formatted.) In thunderbird in your sent folder can you view source (CTRL-U) and see what the mime parts are? The lines that start with "Content-Type:"
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-06T19:55:14.197Z
Answers.Text: The following is the available information regarding the mime parts:
  Content-Type: text/plain; charset=utf-8, i.e. just the most basic variant. - This should probably not be the cause for the effects.
Answers.UserDisplayName: Joachim
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-06T22:39:25.350Z
Answers.Text: @Joachim it sounds like there might be a release in the next day or so that has this fix. Thanks for reporting.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-07T00:48:43.027Z
Answers.Text: This should be resolved in 5.13.2 which has just been released
Answers.UserDisplayName: Seamus Lee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-06T15:11:09.383Z
Answers.LastActivityDate: 2019-05-06T15:57:11.303Z
Answers.LastEditDate: 2019-05-06T15:57:11.303Z
Answers.UserDisplayName: Demerit
Body: <p>I am trying to set up a workflow with CiviCase to automatically file clients' responses on their respective cases.</p>
  
  <p>According to the documentation, mails arriving in the e-mail-to-activity-Mailbox, containing the pattern [case #123] in their subject line, get automatically filed under the respective case (123 in this case) as an activity ('Incoming E-mail').</p>
  
  <p>This is all working fine so far regarding the overall process. However, the contents of the incoming mail is not visible in the 'details' section of the activity. An attachment with the mail gets created, but with the extension '.unknown'. I can download this attachment, manually select a program to view it (e.g. a text editor) and (only) the body of the mail gets displayed as plain text, the header info seems to be stripped off. This behavior happens for html mails as well as plain text mails. </p>
  
  <p>What I originally expected was something like a plain text representation of the mail under details, the same way as it is handled with outgoing mails. And the attachment should ideally contain the unaltered and entire mail, including the header information (date/time, recipients) and have a filename extension which could be recognized by a mail client after download (e.g. .eml).</p>
  
  <p>My main question for now: Is this the intended behavior (then I can arrange to live with it, since I am quite happy with the overall process) or am I missing some configuration settings somewhere?</p>
  
  <p>(Using CiviCRM 5.13.1 and Wordpress 5.1.1)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-06T15:52:51.633Z
Comments.Text: Hmm, I'm able to reproduce this using both thunderbird and gmail. Something must have changed. I'll file a bug at lab.civicrm.org. So it's also not specific to wordpress. I'm guessing your civi version is 5.13.1 but I'm seeing it in the latest dev too.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-06T19:58:01.627Z
Comments.Text: Thanks a lot for your effort!
Comments.UserDisplayName: Joachim
Tags: <email><civicase><activities>
Title: Auto-filing e-mails on Cases: Mail content not shown under details and attachment with extension .unknown created
ThreadText: # Auto-filing e-mails on Cases: Mail content not shown under details and attachment with extension .unknown created
  
  (Asked by: username_0 on 2019-05-06)
  
  I am trying to set up a workflow with CiviCase to automatically file clients' responses on their respective cases.
  
  According to the documentation, mails arriving in the e-mail-to-activity-Mailbox, containing the pattern [case #123] in their subject line, get automatically filed under the respective case (123 in this case) as an activity ('Incoming E-mail').
  
  This is all working fine so far regarding the overall process. However, the contents of the incoming mail is not visible in the 'details' section of the activity. An attachment with the mail gets created, but with the extension '.unknown'. I can download this attachment, manually select a program to view it (e.g. a text editor) and (only) the body of the mail gets displayed as plain text, the header info seems to be stripped off. This behavior happens for html mails as well as plain text mails.
  
  What I originally expected was something like a plain text representation of the mail under details, the same way as it is handled with outgoing mails. And the attachment should ideally contain the unaltered and entire mail, including the header information (date/time, recipients) and have a filename extension which could be recognized by a mail client after download (e.g. .eml).
  
  My main question for now: Is this the intended behavior (then I can arrange to live with it, since I am quite happy with the overall process) or am I missing some configuration settings somewhere?
  
  (Using CiviCRM 5.13.1 and Wordpress 5.1.1)
  
  **Tags:** email, civicase, activities
  
  > **Comments:**
  > **username_1**: Hmm, I'm able to reproduce this using both thunderbird and gmail. Something must have changed. I'll file a bug at lab.civicrm.org. So it's also not specific to wordpress. I'm guessing your civi version is 5.13.1 but I'm seeing it in the latest dev too.  
  > **username_0**: Thanks a lot for your effort!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-05-06. Score: 2 | Accepted answer
  
  Regarding the ".unknown", you can update the list of extensions it recognizes at Administer - System Settings - Safe File Extensions.
  
  Regarding the rest that isn't how it used to work. Not sure if something's changed recently or maybe there is something unusual about those emails. You say it's both html and plain - are all the emails coming from the same source or different types of sources, e.g. MS Exchange, gmail, etc.
  
  UPDATE: <https://lab.civicrm.org/dev/core/issues/940>
  
  > **Comments:**
  > **username_0**: Thank you for your extremely quick response! Just to clarify: The .unknown extension is the name/extension of the activity attachment, which contains the incoming mail. It gets created by civi, which then attaches it to the newly created activity. The email as such does not contain any attachment. Therefore, I don't think the safe file extension can help. I tried to send test mails from various addresses. They got created with Thunderbird, so nothing fancy.  
  > **username_1**: I mean .unknown is what civi puts when it sees an attachment that isn't in that list, so if it thinks it's ".eml" for example, it would put ".unknown" if that isn't in the list. Although you say there is no attachment. (Except technically there is no difference between mime parts and attachments, so even html can be considered an "attachment" depending how the email is formatted.) In thunderbird in your sent folder can you view source (CTRL-U) and see what the mime parts are? The lines that start with "Content-Type:"  
  > **username_0**: The following is the available information regarding the mime parts: Content-Type: text/plain; charset=utf-8, i.e. just the most basic variant. - This should probably not be the cause for the effects.  
  > **username_1**: @username_0 it sounds like there might be a release in the next day or so that has this fix. Thanks for reporting.  
  > **username_2**: This should be resolved in 5.13.2 which has just been released  
  
  ---
  
  