Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP mail() with attachment

specifically trying to send an .xls

1:50 am on Sep 4, 2009 (gmt 0)

New User

5+ Year Member

joined:Aug 26, 2009
posts: 9
votes: 0

I am trying to write a PHP script (that will eventually be run via a cron) to send some XLS files to some people (static addresses). I can get the email to be sent but nothing is in it and nothing is attached.

I'm basing my code on what I found here:

modifying the filename and content-type appropriately. But I don't even see any of the BODY ("Hello world") in the email that eventually is sent and received.

Anybody have any other helpful links or tips?


[edited by: dreamcatcher at 6:33 am (utc) on Sep. 4, 2009]
[edit reason] No Urls Please. See TOS. [/edit]

2:01 am on Sept 4, 2009 (gmt 0)

New User

5+ Year Member

joined:Aug 26, 2009
posts: 9
votes: 0

I just found this:


which looks perfect. But I just tried to install it ("pear install Mail_Mime-1.5.2" as directed) and it wouldn't install:

HTTP error, got response: HTTP/1.1 410 Gone
Didn't receive 200 OK from remote server. (HTTP/1.1 410 Gone)

I could install it on my localhost so it's probably a hosting problem. Now that I've downloaded the .tar.gz package, how do I manually install it (and its dependent package)?

11:05 am on Sept 4, 2009 (gmt 0)

New User

10+ Year Member

joined:July 20, 2005
posts: 28
votes: 0

Hi jenstechs,

Use PHPMailer. [sourceforge.net...]

That's the best solution for all your mailing needs.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members