yes, the script can't include the file data (only the mail header for this attachment is send)
PHP e-mail attachment script
(17 posts) Great offers for webmaster, blogger and web developer!-
Posted 7 months ago #
-
Hi Olaf,
My hosting provider replied.
Absolute Hosting Path: D:\Hosting\4836046\htmlNow what's next step?
Posted 7 months ago # -
Sorry I can't say how you do this in Windows
(I use windows only to work in photoshop)First you need to find a way to handle those paths in PHP on windows.
I'm sure Google has a lot of information on that.On linux I have one file (config.php) in the doc root, creating this constant variable:
define('DOC_ROOT', dirname(__FILE__).'/');Next I include this file in my PHP scripts, let's say the script is one level above the root I use
include_once '../config.php'After including that file I'm able to use the variable
DOC_ROOTin my scripts. This way the server var DOCUMENT_ROOT is not needed anymore.I hope that helps.
Posted 7 months ago # -
Thanks for your advice. I will try to find alternate solution for this.
One more thing I just tried your code with my other hosting(linux, php).
mail function is giving warning.
--
Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/b/e/s/bestjobs1/html/corporate_reg/mail_attach.php on line 26
mail send ... ERROR!
--
any idea?Posted 7 months ago # -
I think this is related to the paths as well.
If you can't get this under your fingers you will fail in PHPtry a simple mail command first:
mail('mail@domain.com', 'mail subject', 'my first mail send via PHP');Posted 7 months ago # -
Hi Olaf,
Thanks for your support and help.
I did it my self.
--Removed 3rd party code--
Posted 7 months ago # -
Hi,
great that you found a working solution.
I removed your code because it's not tested and might not safe.Posted 7 months ago #
Topic Closed
This topic has been closed to new replies.