Thank you so much! You guys are just great!
Thank you so much! You guys are just great!
This worked, thank you. But my other question is that I have an image, and I want to send the link to an image. I'm able to embed the image in an email, but it's not a good idea because most web mail clients don't display embedded images. Is it possible to display the picture, or send the picture to a third party, and generate a link within an email. Have this been done before? Any ideas?
Thank you, it worked, and here's another challenge I'm facing. The list display a picture, and I want to be able to email the link of the image that is stored in the database so they can download the image. The database is secure, and the image gets stored as binary and not in the Files collection. I don't want to embed the image since it may not be viewable by all mail clients. What's a good solution? I don't mind storing the image that I want to email the link to in an unsecured collection. Can I get the path to the image and include in an email even though the database is secure? Thank you,
Hello Mike,
Sorry for radio silence here. Could you please specify, what do you mean with "stored as binary and not in the Files collection"? Is this where you keep it as binary and not in the Files collection?
I meant that the image is saved as a string in a collection.
But, my intention from all of this is to actually have a link included in an email so that when people receive the email they can download the image. Is this possible? The code provided above works perfect on all text fields, but not for images.
Regards,
Any ideas on how that can be implemented? I need to have the image emailed from the list (attached), or a link provided in the email to the image. Please assist.
Hello, I managed to create a drop down list with emails, and email all the text fields provided in the list.
However, I still need to figure out either to send the image as an attachment in an email, or to provide a link to the image so it can be downloaded.
The images display fine in the list. In the database, they are saved as base 64 string. For example: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj...
The column field in the database is a string.
I'm using Sendgrid. Any suggestions how can I email the image, or provide a link?
Regards,
Hi Mike,
For now, we can suggest 2 options:
Hi,
How can I implement that in this code. I tried various variations and it didn't work since the image is placed in a list. It order to show images, I usually use store the image in local storage, and use this code: Image: localStorage.getItem('picture') ? "": ""
But, I don't know how to implement that in this case... The code that works without the image is at follows:
var res = "",
listItem = $(this).closest('[name="mobilelistitem_25"]'),
name = $('[name="name"]', listItem ).text(),
email = $('[name="email"]', listItem ).text(),
data = {
Name: name ? name : "",
Email: email ? email : "",
},
ii;
for (ii in data){
if (data[ii] !== ''){
res += "span" + ii + "/span : span " + data[ii] + "/span";
}
}
res += "";
localStorage.setItem('email',res);
Hello Mike,
If in local storage variable picture is in base64, then please try this:
pre codevar res = "",
listItem = $(this).closest('[name="mobilelistitem_25"]'),
name = $('[name="name"]', listItem ).text(),
email = $('[name="email"]', listItem ).text(),
image = localStorage.getItem('picture'),
data = {
Name: name ? name : "",
Email: email ? email : "",
Image: image ? "<a href='" + image +"'>Image Link</a>" : ""
},
ii;
for (ii in data){
if (data[ii] !== "){
res += "" + ii + " : " + data[ii] + ""
}
}
res += ""
localStorage.setItem('email',res);/code /pre