Forum Moderators: coopster

Message Too Old, No Replies

sending excel attachments

can send to some emails but not others

         

jamie

10:42 am on Jun 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

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

jatar_k

6:45 am on Jun 15, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



does it do it with both the excel and text forat attachments?

what headers are you using?

jamie

8:06 am on Jun 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi jatar_k,

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!

jatar_k

5:30 pm on Jun 15, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



my first guess is always in the headers. Maybe you could post the actual headers/code that you are using and we can take a look at those.

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.

jamie

7:09 pm on Jun 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi jatar_k,

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

jatar_k

1:42 am on Jun 19, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



my guess is that both would give problems