1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Digital Signature Not Showing Up in Email Body

Discussion in 'Community' started by teoyh, Jun 4, 2019.

  1. teoyh

    teoyh Member

    Level: Community

    Not sure why the signature in not showing up but some raw code instead.

    I try using this method, it did not work as well ;

    $orgdigi = "index.php?option=com_fabrik&task=plugin.pluginAjax&plugin=digsig&method=ajax_signature_to_image&format=raw&element_id=9553&formid=582&rowid=".$PID."&repeatcount=0";
    $message = 'Dear '.$custname.'; <br><br>We hereby issue you a total of <b>'.$qty.'</b> taxi voucher of card no <b>'.$cardstart.'</b> to <b>'.$cardend.'</b>. <br><br>Please note the validity date of the voucher will be from '.$startdate.' to '.$enddate.', thereafter the taxi voucher will not be usuable. <br>You had acknowledge the receipt of this voucher on <b>'.$today.'</b><br><br>Your acknowledgement <br><br>'.$orgdigi;
    $res = FabrikWorker::sendMail($MailFrom,$FromName,$email,$subject,$message,true,$Cc,$Bcc,$attachment);

    The image from $orgdigi will show when the user is login if not login it will not show

    Appreciate someone can help me with this many thanks
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Did you try to add the digsig_pdf_secret to your Url? It's used for PDF rendering maybe it will help also in email .

    in case this is working: don't show something like this URL in the email, it would expose the "secret" and so giving access to any of your signatures to the public
    Last edited: Jun 4, 2019
  3. teoyh

    teoyh Member

    Level: Community
    Thank you i will check this out
  4. teoyh

    teoyh Member

    Level: Community
    I don;t think it work, i tested this by first logout and paste the link direct it does not show the image;
  5. teoyh

    teoyh Member

    Level: Community
    Friend Bump :)
  6. teoyh

    teoyh Member

    Level: Community
    In digisig.php;
    when the user is not login the value $json_sig will be null even if the pdfsecret is available
    $elName = $this->getFullName(true, false);
    $json_sig = $row->$elName;

    I added below to get the value and then it will work, but now sure is this is a good idea as i am making changes to the core
    $db = JFactory::getDBO();
    $db->setQuery("SELECT signature FROM stmv3data.etaxi_voucher_registration where id='$rowId'");
    $json_sig = $db->loadResult();
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Do you have an ACL on the digsig element itself, as well as on the list?

    Also, in your example URL in the previous post you have quotes around the secret, which (unless you actually have quotes in the secret you defined) won't work.

    -- hugh

Share This Page