简体   繁体   中英

PHP - TurboSMTP API send email with attachment

I was wondering if it is possible to send amail with (.pdf) attacchment with the TurboSMTP API ( http://serversmtp.com/it/servizio-smtp-api ). I've noticed that in those API there is no method to add an attachment, maybe I've searched wrong.

EDIT: as mark suggested me, I've contacted the provider, and they said that the service does not allow actually to send email with attachment, and in less than a month they're gonna implement that.

Please, someone mark as closed this topic.

Thanks for help btw.

Actually, there is currently a way to attach file, but you have to build a whole MIME body and pass it using the mime_raw post parameter, that overrides content and html_content .

To build a valid MIME body you could inspect what PHPMailer does when you attach a file, the body is built when you call its preSend() method.

Unluckily, I've recently discovered that a MIME body over 150,000 bytes does not get sent. I've opened a ticket with the provider.

我收到了来自 TurboSMTP 支持的电子邮件,它刚刚添加了支持发送带附件的邮件https://www.serversmtp.com/turbo-api/#send-email-2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM