Hi
Sorry my BAD English ok.I am try this code to send attach files to select lines in grid by e-mail and click in the button starbWorks fine.
Send e-mail with attachment and i receive this e-mail with attachment.But this file receive e-mail is corrupt.Why ?Have other good way to make this ?My code:function Row_CustomAction($action, $row)
{
if ($action == “starb”)
{
if ($row[“id”]==2 or $row[“ArquivoPDF”]!=“”)
{
$Email = new Email;
$Email->replaceSender("robo@kaldiris.com.br","RoboK");
$Email->AddRecipient("grego@laclaw.com.br");
$Email->Subject = "LINK ID - ".$row["id"];
$Email->Content = $row["Nome"];
// Attachment
if ($row["ArquivoPDF"]!="")
{
$FilePath = "anexos/" ;
$FileName = $row["ArquivoPDF"];
$FileFull = $FilePath . $FileName;
$Email->addAttachment($FileFull,$FileName);
}
// Enviar...
$bEmailSent = $Email->Send();
var_dump($bEmailSent);
$this->setSuccessMessage($bEmailSent);
$this->setSuccessMessage("OK, E-mail Env.: " .$row["id"]);
}
else
{
$this->setFailureMessage("Reg. sem Anexo : ".$row["id"]);
}
}
return TRUE;
}