开发者

Email image stored as a variable with mosMail()

开发者 https://www.devze.com 2023-03-21 06:35 出处:网络
I wou开发者_StackOverflowld 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

I wou开发者_StackOverflowld 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);


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号