开发者

php email attachement, works but the attachment is corrupt

开发者 https://www.devze.com 2023-01-16 07:30 出处:网络
i have created a form that can send and email with a specified attachment, it come through to my mail address ok, and see开发者_如何学JAVAm to work fine untill i attempt to open the file, it tell me i

i have created a form that can send and email with a specified attachment, it come through to my mail address ok, and see开发者_如何学JAVAm to work fine untill i attempt to open the file, it tell me its damaged or corrupt, i think this is down to my headers.

here is my code.

http://pastebin.com/Y0MUHzSs

any help would be appreciated.


Using the PHP mail function with attachments is pure pain. Just use Swiftmailer for that purpose. This library does everything you need to send the correct encoding and mimetype of the attachment.

0

精彩评论

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