Welcome to WebmasterWorld Guest from 54.198.87.238

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)

5+ Year Member



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:
<snip>

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?

Thanks!

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

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

5+ Year Member



I just found this:

[pear.php.net...]

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 Sep 4, 2009 (gmt 0)

5+ Year Member



Hi jenstechs,

Use PHPMailer. [sourceforge.net...]

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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month