通过php邮件功能发送图像

时间:2022-10-23 18:04:11

Having Problem sending images through php mail function.

有问题通过php邮件功能发送图像。

I have used tiny MCE as a text editor for mail body and pasted some images into the body and some text.

我使用了微小的MCE作为邮件正文的文本编辑器,并将一些图像粘贴到正文和一些文本中。

All content with images are displayed as posted data but when I passed it to mail() function only the text is sent to the mail address.

所有带图像的内容都显示为发布数据,但当我将其传递给mail()函数时,只将文本发送到邮件地址。

I have set the mime version and also content type to text/HTML in header. I don't get what is the actual problem with sending images as content to mail body.

我已将mime版本和内容类型设置为标题中的text / HTML。我不知道将图像作为内容发送到邮件正文的实际问题。

1 个解决方案

#1


3  

Please check the image path you have in your Editor Image path should be something like

请检查编辑器中的图像路径图像路径应该是类似的

Http://www.yoursite.com/images/uploads/image.jpg

if it is like

如果是这样的话

../../../images/uploads/image.jpg

It won't work in emails. try to provide complete image location.

它不适用于电子邮件。尽量提供完整的图像位置。

Thanks

#1


3  

Please check the image path you have in your Editor Image path should be something like

请检查编辑器中的图像路径图像路径应该是类似的

Http://www.yoursite.com/images/uploads/image.jpg

if it is like

如果是这样的话

../../../images/uploads/image.jpg

It won't work in emails. try to provide complete image location.

它不适用于电子邮件。尽量提供完整的图像位置。

Thanks