OK, I'm almost done with my rough draft, I just need to get the part where it e-mails the user the results working.
I've got a command-line based e-mailer installed on the server (A W32/IIS box). I know that the following command works exactly like I need it to from a command prompt:
However, if (inside a .php script on the server) I set $command to exactly that string and do a:
What am I doing wrong? How can I run this command in the shell?
[Sorry that the above code screws up the screen formatting. However, I didn't want to add any line breaks that might confuse anyone. I wanted to quote it exactly.]
I've got a command-line based e-mailer installed on the server (A W32/IIS box). I know that the following command works exactly like I need it to from a command prompt:
code:<HR>Code:"c:\Program Files\NetMailBot\NetMailBot.exe" -to user@domain.net -from DataWarehouse@domain.net -subject "Data Warehouse report that you requested." -server mail.domain.net -body "This test data from the rough draft of our DW front end is strictly confidential." -attachment "c:\Inetpub\wwwroot\DW Front End Draft\db\report2.xls"
However, if (inside a .php script on the server) I set $command to exactly that string and do a:
The call fails with an app return code of 1. I get similar results if I use shell_exec() or similar.code:<HR>Code:$result = system($command, $err)
What am I doing wrong? How can I run this command in the shell?
[Sorry that the above code screws up the screen formatting. However, I didn't want to add any line breaks that might confuse anyone. I wanted to quote it exactly.]