add an image to the body text in SendEmail
Is it possible to add an image field directly into the SendEmail body (ie say a jpeg or PNG file)
in my following script below I do add an attachment file (which is fine)
But I would like to also do is add a static image with the body text
so this looks like .....
this or similar png file is added to the bottom of the above message (in the body that the client sees in their email client
Had a few goes at it but I cant seem to make it work
so whereas as I pick up the attachment.
let myAtt := first(files(record(SystemFile,1)));
i want to pick the an image up in the same manner (always the same for each client)
ie something like let myImage := first(files(record(SystemFile,2)));
my current script (with adding the image line in)
if Status < 2 or Status > 3 then
alert("job Status is not in production")
else
Status := 3;
if not 'Email+' then
alert("No valid contact in email field")
else
if DispFlag = 1 then
alert("Dispatched Confirmation already sent!")
else
let thisBody := first((select SystemFile).OrderDispatchedLetter);
let myEmail := userEmail();
let myAtt := first(files(record(SystemFile,1)));
thisBody := replace(thisBody, "{Ord Company}", text('Ord Company'));
thisBody := replace(thisBody, "{Order Name}", text('Order Name'));
thisBody := replace(thisBody, "{Job Bag}", text('Job Bag'));
thisBody := replace(thisBody, "{Order Date}", text('Order Date'));
thisBody := replace(thisBody, "{Order Name}", 'Order Name');
thisBody := replace(thisBody, "{Order Ref}", 'Order Ref');
thisBody := replace(thisBody, "{Qty}", text(Qty));
thisBody := replace(thisBody, "{Desc}", Desc);
thisBody := replace(thisBody, "{Del Company}", text('Del Company'));
thisBody := replace(thisBody, "{Del Address}", text('Del Address'));
DispFlag := 1;
sendEmail({
from: myEmail,
to: 'Email+',
subject: "Your order has been dispatched by 118 Printgroup",
text: "Goods Dispatched Confirmation",
html: thisBody,
attachments: myAtt
});
alert("Goods Dispatched Email has been Sent");
DisplayMenu := 1
end
end
end
10 replies
-
I gues you can use the function shareFile() on your imagefield and use this in your body like kinda displaying an image in html page.
-
Ninox support have come back and said - currently it is not possible to make this work :
-
Mel Charles
Did this work out for you?
-
Hmmm. I added a Rich Text to my form. When I paste an image in this field and then send the form as an email, the image doesn't get send along. The text int he Rich Text field is received, not the image though.
We need this to work when submitting reports to customers.
One should expect that "everything" in the rich text field will be submitted -
check this post for example database : https://forum.ninox.com/t/x2h7fm9
Steven
-
I figured out the best option for me and our reports.
I created a print form and the print form shows all images which I add into the Rich Text field just fine. Then I create a button which generates the PDF and sends it by email. That solves my issue, hopefully yours as well.
Content aside
- 1 yr agoLast active
- 10Replies
- 302Views
-
4
Following