Swiftmailer发送PDF

时间:2014-05-28 11:28:22

标签: php pdf swiftmailer

我正在使用Swiftmailer发送PDF

我一直收到此错误

ErrorException

fopen(Content-Type: application/pdf; name=53746a9ee9e85SellingAgreement.pdf Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=53746a9ee9e85SellingAgreement.pdf JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuyhlbi1BVSkgPj4NCmVuZG9iag0KMiAwIG9iag0KPDwvVHlwZS9QYWdlcy9Db3VudCAxNi9LaWRzWyAzIDAgUiAxNSAwIFIgMjggMCBSIDM2IDAgUiA0OSAwIFIgNTMgMCBSIDU1IDAgUiA1NyAwIFIgNjEgMCBSIDY1IDAgUiA2OSAwIFIgNzMgMCBSIDc3IDAgUiA4MSAwIFIgODUgMCBSIDg5IDAgUl0gPj4NCmVuZG9iag0KMyAwIG9iag0KPDwvVHlwZS9QYWdlL1BhcmVudCAyIDAgUi9SZXNvdXJjZXM8PC9Gb250PDwvRjEgNSAwIFIvRjIgNyAwIFIvRjMgOSAwIFI+Pi9YT2JqZWN0PDwvSW1hZ2UxNCAxNCAwIFI+Pi9Qcm9jU2V0Wy9QREYvVGV4dC9JbWFnZUIvSW1hZ2VDL0ltYWdlSV0gPj4vTWVkaWFCb3hbIDAgMCA1OTUuMzIgODQxLjkyXSAvQ29udGVudHMgNCAwIFIvR3JvdXA8PC9UeXBlL0dyb3Vw

这是我的快捷代码

  $message->to($star)
     ->subject($name." has contacted you on https://seek.estate")
     ->attach(Swift_Attachment::fromPath('assets/docs/'.$attachment));

在我的php.ini中我有upload_max_filesize

post_max_size = 120M allow_url_fopen = on

不确定导致此错误的原因。 提前致谢。

0 个答案:

没有答案