Getting mad, 3 days testing, please help.
First, I tried with the macro sc_send_mail. I could send mails from a form but with no attachments. I was specifying the correct path or even a direct file. Don?t know why attachments with the macro are note working. As I needed a log or something I installed phpmailer. With phpmail I had no trouble attaching files. I need the attached files to be stored on a database in order for the users to open the email and see the attachments. If I store the files using single upload the files from the temp files goes to the /doc folder and send it correctly and when I re open the form they are not there. If I change the upload field to multiple attachment I lose the name of the file, it returns Array. [LIST=1]
[B]Is there a way to obtain the array values or the name of each file? [/B]
$mail->addAttachment($this->Ini->path_doc.'/'.$doc1); // Add attachments
[/LIST] In the log show the correct path/array. How to obtain the name of the files in the array?
[LIST=1]
[B]Alternative solution. Is there a way to specify the upload field to be single[/B] although I configured the files to be stored in the database? Not the best solution but maybe will work.
[B]Alternative solution. With phpmailer there is a way to send blob stored in a database. [/B]How could you get the blob information and attach it to the mail? Also, how could be done attaching multiples files?
[/LIST] Testing CODE trying to send an specific blob data:
$query = "SELECT emails_attachments FROM emails_attachments WHERE (idemails = 109)";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
header('content-type = application/pdf');
$mail->AddStringAttachment($result,‘myfile.pdf’); /Send the attach of myfile.pdf but always with the same weight.
Thanks in advanced
Santiago