I have a website that allows user to submit a query by selecting few dropdown values and then the result needs to be sent to the email address that the user provides. I want to send a path to the file as a text in the email. However, it is not working. I just get an email with no body and some ATTT00001.bin attachment. I could send the results to user as an attachment but don't want to flood their emails with big attachments. So, we decided to just provide a link to the file. Here is the code that is not working.
exec(' printf "Please find attached the query result for following
selection:\n\nApp: '.$varApp.' \nConfig: '.$varConfig.' \nCounter Type:
'.$varCtrType.' \n\n Path to
result:\"http:abc.def.com\\"'.$output[8].' \n\n Thanks!\n
Disclaimer:Auto generated mail. Do not reply." | /bin/mail -s "Database
Query Result" '.$varEmail.' 2>&1', $output2 );
The path that I want to display is "http://abc.def.com/'.$output[8].'" where output[8] is a variable that holds the name of the result file.
I appreciate your help. Also, I know a lot of people will have issue with not using phpmailer or inbuilt mail, but I have my reasons for not using it right now.
Thanks!