Tag: mandrill

如何使用php curl在Mandrill中附加excel文件

我正在尝试添加一个excel文件(.xlsx)作为我通过Mandrill API发送的电子邮件的附件。 我在一个PHP文件中使用CURL来发送电子邮件。 excel文件被命名为Report.xlsx。 这里是 Mandrill API使用CURL 的链接 。 这是一个链接另一个问题,通过添加文件path。 我收到以下错误信息: PHPparsing错误:语法错误,/var/www/html/newFolder/EmailAlertSystem/mailchimp-mandrill-api-php/UsageReport.php中意外的“path”(T_STRING) (****这是我的代码的目录) 这是我的php代码发送电子邮件通过Mandrill: $uri = 'https://mandrillapp.com/api/1.0/messages/send.json'; $api_key = 'APIKEY'; $content = 'all the content I want to add'; $content_text = strip_tags($content); $from = 'FROM'; $fromName = 'FROMNAME'; $to = 'TO'; $toName = 'TONAME'; $subject = 'SUBJECT'; $fullName = "FIRSTNAME LASTNAME"; $attachment = file_get_contents('Report.xlsx'); $attachment_encoded […]