我是StackOverflow的新手,因为我不会发布任何东西。如果我没有做好这件事,请原谅。
我找到了一篇文章,展示了如何在Codeigniter中集成Mailgun,它工作得很好。请查看此处- How to work with Mailgun API in CodeIgniter; Forbidden error in curl_exe()
当我想在同一段代码中附加一个pdf时,我的问题就来了。不是使用
$this->mailgun::send([
'from' => "Example.com team <no-reply@mg.example.com>",
'to' => "somerandomuser@gmail.com",
'subject' => "Welcome to Example.com",
'text' => "We just want to say hi. Have fun at Example.com"
]);
我曾希望用到以下几点:
$this->mailgun->send([
'from' => "Web Admin <postmaster@xxxxxx.xxxxxs.org>",
'to' => $toemail,
'subject' => $subj,
'text' => $bodtxt,
'html' => $bod,
'attachment' => curl_file_create($increport , 'application/pdf', $increportnm),
'h:Reply-To' => $replyname . ' <' . $replyemail . '>'
]);
其中$increport是我的pdf文件的路径,$increportnm是pdf文件的名称。
当我运行此命令时,没有任何电子邮件发布到Mailgun :(
有人能帮我吗?
https://stackoverflow.com/questions/53822881
复制相似问题