Forum Moderators: coopster
i have a script running which generates lists in excel or txt format and then sends as an attachment via email.
my email account using thunderbird receives these attachments perfectly in the correct format, however my gmail account receives goobledegook.
anyone know why this might happen?
thanks
it happens when i send text to gmail too.
however, when i save the same xls doc to my pc and send as an attachment from my normal thunderbird email program, it is detected correctly by gmail as an attachment.
headers which accompany the automatically-sent mail:
From
To
Subject
MIME-Version
Content-Type
these don't appear to differ from the manual, successful send above?
i have now tested in outlook express, thunderbird and pocomail, and it works each time, but it still doesn't work for gmail.
any clues?
many thanks!
since it works when you create it yourself then it must be in how the script is doing it. You could also try sending yourself one from the script and one you made and compare the headers.
i have now install phpmailer which works, (i was previous using some class i had found online).
the only headers which are different are:
BAD: Content-Transfer-Encoding: 7bit
GOOD: Content-Transfer-Encoding: 8bit
BAD: Content-Type: application/octet-stream
GOOD: Content-Type: application/octet-stream; name="my_file.xls"
can it be the 7bit which causes the problem?
thanks