发送附件错误的电子邮件

时间:2018-03-09 12:02:19

标签: php

我试图在附件中发送带有csv的电子邮件,但是当我使用此代码时不发送。

$origemPortal = array("Portal Loja - Área Loja","Portal Loja - Área Cliente");    
foreach ($returnData as $row)
        {   
            //$iop=$row["OrigemPortal"];
            $op = $origemPortal[$row['OrigemPortal']];
            //logText($op);
        $final_array = array($row['TicketNumber'],
                             $row['OwnerIdName'],
                             $row['SubjectIdName'],
                             $row['ArvoreAssunto'],
                             $row['cartaoquefezpedido'],
                             $row['CustomerIdName'],
                             $row['CreatedOn'],
                             $op,//without this send email
                             $row['Description']
                            );
        fputcsv($file, $final_array,';');
    }


    logText("<a href=".$fileName.">File created on ".$fileName."</a>");

    fclose($file);

    mail_attachment($name_csv,$fileDir,"email@email.pt","email@email.pt","email","email@email.pt",$name,$name);

如果我发送电子邮件,请$op $final_array发送电子邮件。

如何使用$op发送电子邮件?

0 个答案:

没有答案