I have a classic form and an upload image input that allows visitors to enter details and one image.
<input type="text" id="first_name" name="first_name" maxlength="50">
<input type="file" id="image" name="image">
currently I store images on the client server and send just the image URL to the client email, but recently the folder reached the limit of 10MB and no further images uploads were possible and further emails failed submission too.
I tried for a long time to somehow send the form with an uploaded image the the client email, without storing it server side but with no success. Googled all around and tried lot of suggestions – I was just able to send the form but with no image attached to it. What can I do?
You should be able to get the binary contents of the image with file_get_contents($image) using the tmp location when you submit the form and then use that data in the e-mail. The approach to display in the e-mail will vary depending on if you are using html e-mails or not.
This link may help
php: recreate and display an image from binary data