使用 mosMail() 将电子邮件图像存储为变量
我想使用 mosMail() 发送带有图像附件的电子邮件。当我附加位于硬盘驱动器上的文件时,一切正常,但由于我要附加的图像是动态生成的,所以我宁愿不必存储它。是否可以附加存储在变量中的图像?
$attachment = $im;
mosMail(..., $attachment);
I would like to send an email with an image attachment using mosMail(). Everything works perfectly when I attach a file located on the hard drive, but because the image that I want to attach is generated on the fly, I would rather not have to store it. Is it possible to attach an image stored in a variable?
$attachment = $im;
mosMail(..., $attachment);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能,但底层邮件程序库是 PHPMailer。只需包含它并直接使用它即可。您必须重现如何从 Joomla 的配置中读取邮件发送配置设置,只需从 MosMail 复制并粘贴即可
You can't, but the underlying mailer library is PHPMailer. Simply include this and use it directly. You will have to reproduce how mail sending configuration settings are read from Joomla's configuration, simply copy and paste from MosMail