TOPIC:

Include signature image (not as an attachment) in the admin email (Html code)? 2 years 6 months ago #224522

  • Topic Author
  • sakari
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
Hello friends,
have a problem with the signature!
How do I get the signature image (not as attachment) in the admin email (Html code)?
{Signatur: value}
Many thanks for your help.

Best regards :)
Sakari

Please Log in or Create an account to join the conversation.

Include signature image (not as an attachment) in the admin email (Html code)? 2 years 5 months ago #224805

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

It is not possible to display image while creating custom email in Admin email tab with: {Signatur: value} .

There is a way to include signature in your admin email, but you have to go to Advance options of your form > More options > Submit pieces > End Submit, select Type Custom and paste in something like this:
$this->execPieceByName('ff_InitLib');
$from ='test@gmail.com';
$fromname ="test";
$subject = 'Your Email Subject'; // Change to your preferred Email subject
$recipient = 'youremail'; // Change to your admin Email address

//grab values from fields that you want to pass in Admin email, replace Signatur and name with names of elements in your form
$signature= ff_getSubmit('Signatur');
$name= ff_getSubmit('name');

$attachment=null;
$isHtml = true;

$body =  "
<html><body>
<h1>This is the title of email </h1>

<table>
<tr>
<td>
   <strong>Name:</strong>
</td>
<td>
   $name
</td>
</tr>

<tr>
<td>
   <strong>Signature:</strong>
</td>
<td>
   <img src= 'http://localhost/media/breezingforms/signatures/'.$signature alt='mypicture' width='50' height='60'>
</td>
</tr>
</table>
</body></html>";

$this->sendMail($from, $fromname, $recipient, $subject, $body, $attachment, $isHtml);   
This is an example for a form that has fields named Signatur and name.

Replace what is noted in the coments.
The part of the code that shows the picture is:
<img src= 'http://localhost/media/breezingforms/signatures/'.$signature alt='mypicture' width='50' height='60'>
In that part of code replace localhost with your site domain.

I hope that this will help you.
Let me know if you've managed to set this for your form. If you have more questions, feel free to ask.

Regards,

Mihaela

Please Log in or Create an account to join the conversation.

Include signature image (not as an attachment) in the admin email (Html code)? 2 years 5 months ago #224813

  • Topic Author
  • sakari
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
Hello Michaela,
First of all thank you for your help.
I have set as you have described it and replaced the "localhost" against the web address, but unfortunately the signature is not displayed!

Best regards
Sakari
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by sakari.

Include signature image (not as an attachment) in the admin email (Html code)? 2 years 5 months ago #224860

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hmm, that is strange. As you can see in the picture below it should work.


Please check whether the signatures are saved in /media/breezingforms/signatures folder.

Regards,

Mihaela
Attachments:

Please Log in or Create an account to join the conversation.

Include signature image (not as an attachment) in the admin email (Html code)? 2 years 5 months ago #224876

  • Topic Author
  • sakari
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
The path is correct, but I see in the folder now two stored signatures, one which generates the form itself and one of the script of you!

From the form: Signatur-4eb648320dda45a60ab93a7ae197f1eb.png
From the script: bfQuickMode9729867-d7d467d99a2977b62f5cf3092eee4b58.png

Is that the problem?


Best regards :)
Sakari

Please Log in or Create an account to join the conversation.

Last edit: Post by sakari.

Include signature image (not as an attachment) in the admin email (Html code)? 2 years 5 months ago #224880

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
The script shouldn't generate new signature. It is only used to display a signature in the email.

Can you replace this line of code:
<img src= 'http://localhost/media/breezingforms/signatures/'.$signature alt='mypicture' width='50' height='60'>
with this one:
<img src= 'http://localhost/media/breezingforms/signatures/Signatur-4eb648320dda45a60ab93a7ae197f1eb.png' alt='mypicture' width='50' height='60'>
Once again, instead of localhost it should be your site's address.
Please, before testing the email, check whether the picture is displayed when you visit that link 'http://localhost/media/breezingforms/signatures/Signatur-4eb648320dda45a60ab93a7ae197f1eb.png .

This will be a test to see whether the image(signature) that you know is there will be displayed in the email. If this will work then it must be some issue with $signature variable not fetching the value correctly.

Regards,

Mihaela

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.116 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!