Hi,
I have just used change nodes to put my temperature values into global variables, and managed to get my smtp gmail account working ie sending emails, my goal really is to send an email with a coloured background a picture on the top and text containing the values of the variables, i have had a look at UI builder but not sure if I could use it for this ?, is this called a formatted email ?, any ideas on the easiest way to achieve this please
Hi,
I don't think it is possible to send an email with a picture in it unless the the picture is on an online server somewhere, as far as I can see you are stuck with fonts and colours, if anyone could confirm this I would be grateful.
Hi Colin,
Yes, been reading stuff about this all afternoon, Steves link shows how to turn the image into Base64 which I did and outputted the code but when i use the code in my email it displays nothing, I think I have confused things slightly by using the MJML node and their own styling, I have managed to cobble togethor an email using node-red global variables which gets sent every day, but I will keep on trying the picture route as I would like to put a little logo on there, when I search for Base64 and MJML not much comes up and it seems that it is frowned upon as it can cause emails to not be received, also people are saying that the base64 images are not showing in Gmail which is what I am using.
Hi, there are a few things to think about when using HTML formatted emails.
First is that not all email clients support all HTML formatting. So what you send isn't always what the receiver will see. Try to stick to safe tags where you can. URL's are generally NOT safe tags to an email client and most clients won't show the image without additional user intervention.
Second is that most email servers have message size limits so you do need to be somewhat cautious about including images.
Ah, just read your bit about using gmail. I'm afraid that Google Mail is NOT a proper, standards compliant email client.
Amongst other things, it will not display images using data URI's.
I've left the rest below as I'd already written it. Might be useful to someone.
Others are correct to say that you can use data URI's to include images and I do that in my own work email signatures. I currently have 2 in fact. One for the work logo and one for the BCS logo.
Note that the data URI src attribute should not have an line breaks in it.
As for using UIBUILDER to help. It won't really help with converting the image of course. However, you could use it to build the HTML if you wish to, it has the uib-html node that will convert the no-code/low-code node outputs to full HTML that you can then use in an email.