PDF Attach Corrupt

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;
}

The first parameter should be the file name, and the second parameter should contain the file content. Read:
/**

  • Add attachment
  • @param string $fileName Full file path (without $content) or file name (with $content)
  • @param string $content File content
  • @return void
    */
    public function addAttachment($fileName, $content = “”)

Thanks a lot for your return.WORKS ! YES ! :slight_smile:

	$Email->addAttachment($FileFull);