问题
I'm using Swiftmailer to send PDFs
I keep receiving this error
ErrorException
fopen(Content-Type: application/pdf; name=53746a9ee9e85SellingAgreement.pdf Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=53746a9ee9e85SellingAgreement.pdf JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuyhlbi1BVSkgPj4NCmVuZG9iag0KMiAwIG9iag0KPDwvVHlwZS9QYWdlcy9Db3VudCAxNi9LaWRzWyAzIDAgUiAxNSAwIFIgMjggMCBSIDM2IDAgUiA0OSAwIFIgNTMgMCBSIDU1IDAgUiA1NyAwIFIgNjEgMCBSIDY1IDAgUiA2OSAwIFIgNzMgMCBSIDc3IDAgUiA4MSAwIFIgODUgMCBSIDg5IDAgUl0gPj4NCmVuZG9iag0KMyAwIG9iag0KPDwvVHlwZS9QYWdlL1BhcmVudCAyIDAgUi9SZXNvdXJjZXM8PC9Gb250PDwvRjEgNSAwIFIvRjIgNyAwIFIvRjMgOSAwIFI+Pi9YT2JqZWN0PDwvSW1hZ2UxNCAxNCAwIFI+Pi9Qcm9jU2V0Wy9QREYvVGV4dC9JbWFnZUIvSW1hZ2VDL0ltYWdlSV0gPj4vTWVkaWFCb3hbIDAgMCA1OTUuMzIgODQxLjkyXSAvQ29udGVudHMgNCAwIFIvR3JvdXA8PC9UeXBlL0dyb3Vw
This is my swift code
$message->to($star)
->subject($name." has contacted you on https://seek.estate")
->attach(Swift_Attachment::fromPath('assets/docs/'.$attachment));
in my php.ini I have upload_max_filesize
post_max_size = 120M allow_url_fopen =on
Not sure what could be causing this error. Thanks in advance.
来源:https://stackoverflow.com/questions/23910407/swiftmailer-sending-pdf