Forums

Select image and send in mail

jasch 28 Nov, 2015
Hello

I have a group of images

Radio 1: imagen1
Radio 2: imagen2
Radio 3: Image 3

I can show the thumbnail of the image using custom code

I require that the selected image is mailed, but not displayed in the email body.


anyone knows how to achieve this, so that when choosing within 3 choices of images, one of which is sent in the mail body

something similar to sending an ecard


Thank you for your help
GreyHead 28 Nov, 2015
Hi jasch,

Please see this FAQ which has the code to add a file from your server as an email attachment. You will need to edit this a bit so that the "ABSOLUTE SERVER PATH TO FILE HERE" part is set depending on the radio button selected.

Bib
jasch 29 Nov, 2015
hi thanks for reply

I have some doubts, the option that tells me I may send the picture in the mail as an attachment but not as part of the mail?

and how I can adapt this code in selecion option group

<? php
$ form-> files ["field_name"] ["path"] = "ABSOLUTE PATH TO FILE SERVER HERE";
// You can change the "field_name" string to something else
?>

imagining tendo, value img1, img2 value, value img3
and selected to be included in the mail as part of the template

thank you very much for your attention and apologize for the inconvenience but I'm just using the ChronoForms

attached an example of what I look for
GreyHead 29 Nov, 2015
Hi jasch,

The way the ChronoForms email is set up you can’t embed an image in an email as far as I know. You can include an image link in the Email template as normal <img src=',,,' /> but note that the URL must be complete including the domain, and that some mail readers may not display it.

If an <img> link does what you need you need you could for example set the values of the radio buttons to the image name
<input type='radio' name='insert_image' value='image_a.jpg' />


Then you'd add {insert_image} in the email template as, for example
<div><image src='http://my-domain.com/some/path/{insert_image}' />


Bob
This topic is locked and no more replies can be posted.