Hello!
I've been experimenting with the module, especially with the auto create node on incoming mail feature. I've found that the attachments I send from mac mail comes up as 'noname' attachments in the nodes. When I send from web mail this is not a problem and I haven't been able to try on a windows machine.
I suppose there is something going on in the '_support_save_attachments' function in support.module since that seems to be where the 'noname' comes from if the code can't find a filename. It seems this is way above my head atm but I'll report it anyway to see if anyone else had any issues with this.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | support.module.txt | 147.21 KB | shevgeny |
| #8 | mailtest.txt | 4.09 KB | gigiozzz |
| #8 | test_imap_attachment.txt | 7.9 KB | gigiozzz |
| #8 | mac.patch | 4.52 KB | gigiozzz |
Comments
Comment #1
span commentedJust thought I'd give some more information on this.
The attachments are saved as 'noname' without extension.
If there is no attachment to the mail however, the mail itself gets stored as an attachment called 'noname.html'. I assume this is expected behaviour.
When a mail with an attachment is being sent from mac mail only the attachment is saved (as 'noname'). The message itself is saved in the node as it should but there is no creation of an attachment of the mail itself as there is when a mail is being sent without attachment.
To my knowledge I'm using the default mac mail settings. I've checked the inbox on the server that recieves the mails and all _seems_ fine.
Comment #2
jeremy commentedWhen this happens, I would expect that you're essentially seeing two copies of the email. The first should show up in the ticket body, the second should show up as an attachment with the 'noname.html' name. This happens when an email includes both a text version and an HTML version. Or, are you saying that you're getting a blank ticket with only an html attachment?
Comment #3
span commentedThe ticket content looks fine and I'm sure your right about the two versions of the mail causing one attachment to be saved as a .html file.
The issue I was trying to report though is if I attach a file to the mail sent, that file gets stored as an attachment with the name 'noname' without extension. So even if I attach 'example.pdf' it gets listed as 'noname'. When I send from webmail, this is not a problem.
Comment #4
jeremy commentedThis is happening for you for all messages attached from the Mac client?
Comment #5
span commentedYes, any file I attach and send from the Mac client this happends to.
Comment #6
Valeratal commentedI have problem too
I set Mimemail to use the SMTP Authenticaiton module as the engine, the email went through, but it was a blank email with an attachment named "noname".
Comment #7
rsevero commentedThe patch available at #981622: File names with accents of attached files in emails for ticket creation got created with nontranslated filenames: not accessable might help with this issue.
Could some Mac owner test it?
Comment #8
gigiozzz commentedThis don't resolve anything!!!
you didn't understand the real problem
problem:
1) apple MAIL program send mail in a very different way (see example attachment [1])
2) who wrote fetching attachment function misunderstood the SECTION param
"The part number. It is a string of integers delimited by period which index into a body part list as per the IMAP4 specification "
STRING like 2.1
because sometimes an attachment is in a "SUB MIXED SECTION" so you need recursive function
solution:
1) test the little cli program [2] with your mail from MAIL mac program
2) use patch [3]
i had the same problem and i solved it with this patch for stable version (i'm yet testing it)
you people should read better at docs (RTFM) ther'is always a solution (i arranged the patch in 1 hour more or less with function in the manual pages)
http://www.php.net/manual/en/function.imap-fetchstructure.php
http://www.php.net/manual/en/function.imap-fetchbody.php
please
i like support module
BUT
you guys should improve a lot the fetching mail stuff (because it's a really important feature)
Comment #9
rsevero commented@gigiozzz:
I'm sorry that my suggestion (trying the patch available at #981622: File names with accents of attached files in emails for ticket creation got created with nontranslated filenames: not accessable) didn't solve this issue. Please understand that the mentioned patch wasn't made to fix this issue at all.
I had this hunch that the mentioned patch could fix this issue also. It seems I was wrong.
It was made to fix the issue mentioned in issue # 981622. And as far as I can tell it does that.
I'm happy that you finally managed to fix this issue.
Comment #10
jeremy commentedNeeds further testing and a resolution if still a problem, re-opening.
Comment #11
bdragon commentedhaving a look-see.
Comment #12
Exploratus commentedI am having the same problem... When I email through a MAC, I get noname. Does the patch resolve this? Seems pretty old and a good % of people use MACs.
Comment #13
Exploratus commentedPatch seems to work. Can we get this commited?
Comment #14
xaa commentedhi, patch #8 kindly provided by gigiozzz is still valid for the 7.0-rc2 .
ps: we are on windows and ticket sent by outlook, gmail and Co generated the noname.html file (code source of the mail).
D7 follow-up : http://drupal.org/node/1876036
Comment #15
betz commentedI can second this patch is applicable for D7.
I got a jpg as attachment, but when trying with a zip file, it is still a noname file.
But at least images work
Comment #16
jeremy commentedHere's a direct link to where this came from -- reviewing:
http://www.php.net/manual/en/function.imap-fetchbody.php#89002
Comment #17
jeremy commentedTagging to review when I'm set up to test mail.
Comment #18
Homotechsual commentedReviewed and tested on 7.x-1.x-dev and RC1. Works as intended.
Comment #19
bwoods commentedFor D7, I had to make one slight alteration to #8. I was seeing a notice for $obj->parts not being found, so I included an isset check before it. This is near the bottom of the add_part_to_array function. Thanks!
Comment #20
shevgeny#19, Hello Ben! Could you please send the code to your adjustment? I have the same problem arises. I'll be very grateful! (For D7)
Comment #21
shevgenyError
Notice: Undefined property: stdClass :: $ nid function _support_subscribe_form_attach () (line 3043 file /sites/all/modules/support/support.module).
(Drupal 7)
Comment #22
purencool commentedComment #23
purencool commentedComment #24
purencool commented