cancel
Showing results for 
Search instead for 
Did you mean: 

Email Scenario - content Type does not have filename

azharshaikh
Active Contributor
0 Kudos

Hi All,

We have an Email to File Scenario. PI is connected to Outlook server using Sender Mail Channel using POP3.

We are able to fetch and read the Attachment filenames (using Attachment.getContentType method) correctly for most of the received emails. However we notice that for Email sent from Yahoo mail ID, we are not getting the Attachment Filename in contentType. See the attached screenshot from Pimon for difference. Due to this PI fails to read the Attachment files and does not forwards it to the receiver system, causing loss / drop of att file.

Let us know if you faced similar issue and possible way to read the Attachment filenames.

Regards,

Azhar

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi Azhar

Did you try adding MultipartHeaderBean as the first module of the module chain in order to get additional mail attributes? You should be able to see other details and that might help you compare the differences between Gmail and Yahoo and adjust your development accordingly.

I used it before following the blog below and managed to get it to work, but can't remember fully the details.

Rgds

Eng Swee

engswee
Active Contributor
0 Kudos

I think the filename was in Part[1].Content-Disposition so did a Dynamic Configuration UDF to extract it from there. I think different mail servers behave differently so will have to test out all of them and see if there filename is in a common attribute.

azharshaikh
Active Contributor
0 Kudos

Hi Eng,

Thanks for inputs.

We have added condition in Java Mapping to check for these fields in following order:

1. Content-Type

2. Content-Dispositon

3. Content-Desc

so on...

Since different mail servers sends these details in different fields

Regards,
Azhar

Answers (0)