Contact form 7 image on email body img tag - contact-form-7

I want to create one submission form with file/image upload. Image for company logo/picture etc. Normally I know how to attach images, as an attachment in the mail, but I want image attached on mail body as an image tag so when I open my email I can see all filed with image then print it from email.
Example email message below
<table width="500" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th scope="row">Your Name</th>
<td>[your-name]</td>
</tr>
<tr>
<th scope="row">Your Email</th>
<td>[your-email]</td>
</tr>
<tr>
<th scope="row">Subject</th>
<td>[your-subject]</td>
</tr>
<tr>
<th scope="row">Your Message</th>
<td>[your-message]</td>
</tr>
<tr>
<th scope="row">Picture</th>
<td><img src="[file-305]"></td>
</tr>
</tbody>
</table>
Is there any way to send image on image tag in mail body or it can be sent full from as a pdf file ?
if there have any free or paid plugins that also ok.

I would suggest you modify the email composing routine a bit and include the image as base64 as an inline image.
First conver the image to base64 using How to convert an image to base64 encoding?
$path = 'path/to/uploaded-file/myimage.png';
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
Then include it in your email using embedding image in html email
<img src="<?= $base64 ?>" />
And most email clients should readily accept it. Otherwise you can always refer to the content id in the email of the attached file
<img src="cid:part1xxxxxxxxxx" alt="">

Yes. You can send an image through user input
I found the following resources
Check this out :
enter link description here
Download CF7 – HTML Email Template Extension
this is the format for File Upload
[file your-file filetypes:pdf|txt limit:2mb]
File Uploading and Attachment

You can try this for printing image in email body:
<img src="[url-file-305]"/>
Use this plugin to send form data with a PDF file:
Send PDF for Contact Form 7

the best and easiest way to do is just install the plugin "
Contact Form Entries". further create a contact form having file upload field and test the same.
when you upload an image and send the contact form. the uploaded image will be saved in your wordpress directory.
In my case it was uploaded in the following folder:
https://jssngo.org/wp-content/uploads/crm_perks_uploads/62da94f8afa179639552259563503/2022/07/photo.png
now use the following code in your email body:
image Tag src="https://jssngo.org/wp-content/uploads/crm_perks_uploads/62da94f8afa179639552259563503/2022/07/[file-990]"
replace the "src=" with yours and replace the [file-990] tag with yours created in contact form 7.

Related

GitHubPages - Jekyll Template generated correctly from README.md failed

I've the following problem...
I created a GitHub-Page for my project, because I'm not a webpage developer and don't have any special skills in HTML or CSS, I generated this page by a template you can choose from your repository settings...
Now I have the problem that the Jekyll page generated from template combined with my README.md doesn't show the preview image. In my README.md file I specified the image with this tag:
| ![Preview Image](https://github.com/0x1C1B/JContacts/blob/master/doc/img/preview.png) |
|:--:|
| *Preview image of application* |
But Jekyll displays only the subscription of the image, you can see it here.
Is it possible to solve this bug or is it a template depended problem?
EDIT: This is the generated HTML code:
<table>
<thead>
<tr>
<th style="text-align: center"><img src="https://github.com/0x1C1B/JContacts/blob/master/doc/img/preview.png" alt="Preview Image" /></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center"><em>Preview image of application</em></td>
</tr>
</tbody>
</table>
To use an absolute-url to an image in your GitHub repository, use the link to "raw" image instead.
In other words, use the following URL instead:
https://github.com/0x1C1B/JContacts/raw/master/doc/img/preview.png

Outlook - Images not showing in signature of original mail when replying

I have made an email signature in Outlook (2016) by pasting HTML in the window where one can type a new signature (File>Options>Email>Signatures>New).
It looks good when sending a mail, it shows all images. The receiver of the mail (on any other mail client but Outlook, e.g. on Apple Mail or Gmail) can see the images too, but when this receiver using Apple Mail or so is going to reply to this mail, the images in the signature of the originally sent email have disappeared and have been replaced by
<image001.png> (referring to images saved locally within C:\Users\[name]\AppData\Roaming\Microsoft\Signatures, in the respective [signature name]_files folder, while the src of the original <img/>s in the signature are URLs to actual accessible files on the web). These images can be displayed anyway by clicking a button to 'include attachments of the original mail', which is, let's say, weird. It apparently turns the images in Outlook-signatures into attachments, which are being blocked or so, as it seems.
Has anyone had a comparable problem, and/or is kind to share a solution for this issue?
Thank you in advance.
Try adding ? and then a random number at the end of your image URL. Also, make sure you are using a CDN to deliver the image. I use cloudinary.com...
Here is an example of what I did...
<table cellPadding="0" cellSpacing="0">
<tbody>
<tr>
<td style="vertical-align:top"></td>
<td>
<div><font size="4">Name</font></div>
<div>Title</div>
<div><span style="margin-right:8px">phone</span></div>
<div><span style="margin-right:8px"><a style="color:blue" href="mailto:email">email</a></span></div>
<div><span style="margin-right:8px">address</span></div>
<div style="padding: 0 0em 2em 0;">
<img src="http://CDN/Facebook.jpg?7" alt="Facebook" />
<img src="http://CDN/Twitter.jpg?5" alt="Twitter" />
<img src="http://CDN/Instagram.jpg?3" alt="Instagram" />
<img src="http://CDN/Linkedin.jpg?2" alt="LinkedIn" />
</div>
</td>
</tr>
</tbody>
I open this HTML in my web browser, copy and paste it into the signature section of Outlook. One caveat.. I am using the Outlook Web Browser for my email, not the Application.
I have been testing:
Outlook -> Gmail -> Outlook, and my signature stays intact.
So far this has been working for 2 days. I am going to keep testing but give it a shot and let me know if you see the same good results.

Email signature becomes attachment when replied from Gmail

I have a new signature and I use Outlook 2003 to send out my emails. The graphics within are sourced from a server. The email+signature look fine, but when somebody using Gmail replies to me, the graphics within the email become attachments for them.
Previous answers suggest having the graphic on a web server, but I do this already. One possible fix I have seen is using moz-do-not-send="true" ...but that is only for Mozilla it seems, is there not a global alternative or another fix I could use?
Many thanks.
<span><a href="http://www.website.co.uk" target="_blank" ><img src="http://www.website.co.uk/allowed/images/logo.jpg" border="0" hspace="10" /></a></span>
I have been messing with this for a while now and I may have found a fix.
First, I created a complete HTML file.
<table cellPadding="0" cellSpacing="0">
<tbody>
<tr>
<td style="vertical-align:top"></td>
<td>
<div><font size="4">Name</font></div>
<div>Title</div>
<div><span style="margin-right:8px">phone</span></div>
<div><span style="margin-right:8px"><a style="color:blue" href="mailto:email">email</a></span></div>
<div><span style="margin-right:8px">address</span></div>
<div style="padding: 0 0em 2em 0;">
<img src="http://CDN/Facebook.jpg?7" alt="Facebook" />
<img src="http://CDN/Twitter.jpg?5" alt="Twitter" />
<img src="http://CDN/Instagram.jpg?3" alt="Instagram" />
<img src="http://CDN/Linkedin.jpg?2" alt="LinkedIn" />
</div>
</td>
</tr>
</tbody>
As you can see, I added a ? and then a number after my image source. So far, in two days of testing from Outlook (I admit, I am using the web interface and have yet to test from the app) to Gmail then replying back to Outlook - all of my replies send the signature as they should.
I opened my HTML and copy and pasted the signature into Outlook.
Fingers crossed this continues to work and hopefully this helps someone else.

How to send image data to server? (I already have a sample page)

How to send image data to server? (I already have a sample page)
Sample Page html Source Code
<form action="/uploadfile.html" method="post"
enctype="multipart/form-data" onSubmit="return validate();">
<fieldset><legend>Upload File</legend>
<table>
<tr>
<td><input name="fileData" id="image" type="file" /></td>
</tr>
<tr>
<td><br />
</td>
<td><input type="submit" value="Upload" /></td>
</tr>
</table>
</fieldset>
</form>
It works fine on web page. (File Name: 1234.png)
This server check file name and save specific DB.
Example (These work very well on web page *http://SAMPLE_PAGE.com/uploadfile.html*)
1234.png or 5678.png =upload=> save to number.db
abcd.png or wxyz.png =upload=> save to alphabet.db
I must upload via iOS and I have a data object (imgData).
NSData *imgData; // Image Data
NSString *wantedFileName = #"1234.png";
How to upload to server via iOS Device? (like sample web-page)
When we want to upload any file on server using some application we can use multi-part request for this. In this we create a NSURLMutableRequest object with multipart body having desired data.
You can visit following links for a pointer:
send image to server in multipart iphone
Sending multipart request from iPhone to Ruby on Rails (RoR) server

Outlook Web App incorrectly renders HTML emails that don't reside in the Inbox

Working on an HTML email, we've gotten the email to render properly everywhere: Outlook 2010, Mozilla Thunderbird, Horde/IMP, Gmail, Yahoo, etc. etc. However, when the email is checked via the Outlook Web App (Exchange 2010), the HTML email is incorrectly rendered sometimes.
The two issues we're seeing is that in Internet Explorer and Firefox, the font-size CSS in-line directives aren't respected and in Firefox, a gap is put between the table cells, breaking the image. This only happens when the message is NOT in the Inbox. If we drag the message from a folder into the Inbox, the problems disappear. Drag it back into a folder and they reappear. If we open the message in a new window (instead of in the preview pane), the message renders properly.
I'm guessing the CSS of the Outlook Web App is interfering, but I'm hoping someone has had a similar issue and might be able to shed some light on how we can fix this problem.
Here is the relevant message source as seen in the client:
<html>
<head>
<style>a{color:#BF0005}</style>
</head>
<body bgcolor="#F5F5F5" style="margin:0;text-align:center">
<table cellpadding="0" cellspacing="0" style="width:604px;margin:0 auto;font-family:Tahoma,sans-serif;font-size:10pt;line-height:16pt">
<tr>
<td rowspan="3" style="vertical-align:top;width:10px"><img src="cid:2e39cc62f2ab417d1b9461b437c72ffc" width="10px" height="410px" /></td>
<td style="padding-top:10px;margin-bottom:0;vertical-align:bottom;width:584px;height:84px"><img style="vertical-align:bottom" src="cid:5ed2b7dfeca322e0d1e0b40bd3a0a48d" width="584px" height="84px" alt="Image Alternate Text Here" /></td>
<td rowspan="3" style="vertical-align:top;width:10px"><img src="cid:6f108f42f85401cababf9d5dc64fb8f9" width="10px" height="410px" /></td>
</tr>
<tr>
<td style="vertical-align:top;text-align:left;background-color:#FFF;padding:0 50px 40px">
<h1 style="text-align:center;margin-top:15px;font-size:12pt">Header</h1>
<p>This is a test email.</p>
</td>
</tr>
<tr>
<td colspan="3" style="padding:30px 50px;font-size:8pt;text-align:center;color:#888888;line-height:10pt">Footer text</td>
</tr>
</table>
</body>
</html>
EDIT: I've done some digging into the source via Firebug, and I think I've narrowed it down to being a problem with the Outlook Web App. In the Inbox view, the body of the messages are encapsulated in an <iframe> and the contents of the HTML message are unchanged. However, viewing the source of messages in other folders, no <iframe> is used and the <body> tag of the message is converted into a <div> by OWA. The message is then incorporating styles from the OWA style sheet that seem to be overwriting the inline style of the HTML email.
I think we're going to open up a ticket with Microsoft.
Unfortunately, this problem is a Microsoft issue. We've opened a ticket with them a while ago, but have not heard back. Therefore, we'll just have to make do.