teoyh
Member
I had created a schedule php task to send out email with an attachment ;
I created a php with the following
<?php
defined('_JEXEC') or die();
$db = FabrikWorker::getDbo(false, 3);
$db->setQuery("SELECT attachment FROM stm_change_req where id='11'");
$docattach = $db->loadResult();
$strcount = strlen($docattach);
if($strcount!==0){
$filelen = $strcount - 30;
$docfile = 'images/change'.substr($docattach,30,$filelen);
$attachment[] = $docfile;
}
$email = "test@test.com";
$subject ="Testing";
$message ="Testing";
$res = FabrikWorker::sendMail($MailFrom, $FromName, $email, $subject, $message,true,$Cc,$Bcc,$attachment,$replyto,$replytoname);
?>
The email was send but the attachment was not sent.
I tested the above in List Plugin Php no issue , can someone help me with this , thank you in advance
I created a php with the following
<?php
defined('_JEXEC') or die();
$db = FabrikWorker::getDbo(false, 3);
$db->setQuery("SELECT attachment FROM stm_change_req where id='11'");
$docattach = $db->loadResult();
$strcount = strlen($docattach);
if($strcount!==0){
$filelen = $strcount - 30;
$docfile = 'images/change'.substr($docattach,30,$filelen);
$attachment[] = $docfile;
}
$email = "test@test.com";
$subject ="Testing";
$message ="Testing";
$res = FabrikWorker::sendMail($MailFrom, $FromName, $email, $subject, $message,true,$Cc,$Bcc,$attachment,$replyto,$replytoname);
?>
The email was send but the attachment was not sent.
I tested the above in List Plugin Php no issue , can someone help me with this , thank you in advance