电子邮件正文 img 标签上的联系表 7 图片
Contact form 7 image on email body img tag
我想创建一个带有 file/image 上传的提交表单。公司图片 logo/picture 等。通常我知道如何附加图片,作为邮件的附件,但我希望将图片作为图片标签附加在邮件正文上,这样当我打开电子邮件时,我可以看到所有带有图片的文件然后从电子邮件打印它。
电子邮件示例如下
<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>
有没有什么方法可以发送邮件正文中图像标签上的图像,或者可以将其作为 pdf 文件完整发送?
如果有免费或付费的插件也可以。
我建议您稍微修改电子邮件撰写例程,并将图像作为 base64 作为内联图像包含在内。
首先使用 How to convert an image to base64 encoding?
将图像转换为 base64
$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);
然后使用 embedding image in html email
将其包含在您的电子邮件中
<img src="<?= $base64 ?>" />
而且大多数电子邮件客户端应该很容易接受它。否则,您可以随时参考附件电子邮件中的内容 ID
<img src="cid:part1xxxxxxxxxx" alt="">
是的。您可以通过用户输入发送图像
我找到了以下资源
检查一下:
这是文件上传的格式
[file your-file filetypes:pdf|txt limit:2mb]
我认为这个 Send PDF for CF7 plugins 适合它 https://www.youtube.com/watch?v=ETIrrzlcKxs
您可以尝试在电子邮件正文中打印图像:
<img src="[url-file-305]"/>
使用此插件发送带有 PDF 文件的表单数据:
Send PDF for Contact Form 7
我想创建一个带有 file/image 上传的提交表单。公司图片 logo/picture 等。通常我知道如何附加图片,作为邮件的附件,但我希望将图片作为图片标签附加在邮件正文上,这样当我打开电子邮件时,我可以看到所有带有图片的文件然后从电子邮件打印它。
电子邮件示例如下
<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>
有没有什么方法可以发送邮件正文中图像标签上的图像,或者可以将其作为 pdf 文件完整发送?
如果有免费或付费的插件也可以。
我建议您稍微修改电子邮件撰写例程,并将图像作为 base64 作为内联图像包含在内。
首先使用 How to convert an image to base64 encoding?
将图像转换为 base64$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);
然后使用 embedding image in html email
将其包含在您的电子邮件中<img src="<?= $base64 ?>" />
而且大多数电子邮件客户端应该很容易接受它。否则,您可以随时参考附件电子邮件中的内容 ID
<img src="cid:part1xxxxxxxxxx" alt="">
是的。您可以通过用户输入发送图像
我找到了以下资源 检查一下:
这是文件上传的格式
[file your-file filetypes:pdf|txt limit:2mb]
我认为这个 Send PDF for CF7 plugins 适合它 https://www.youtube.com/watch?v=ETIrrzlcKxs
您可以尝试在电子邮件正文中打印图像:
<img src="[url-file-305]"/>
使用此插件发送带有 PDF 文件的表单数据: Send PDF for Contact Form 7