我尝试使用以下 curl 示例向用户和所有者发送 2 封邮件。如果我想在 php 中使用以下代码发送邮件,我该怎么做?实际上,示例代码来自一个名为 sendinblue 的服务。我很想听听你的意见!
curl -H 'api-key:your_access_key' -X POST -d '{"cc":["cc@example.net":"cc whom!"],"text":"This is the text","bcc":["bcc@example.net":"bcc whom!"],"replyto":["replyto@email.com","reply to!"],"html":"This is the <h1>HTML</h1>This is inline image 1.<br/><img src=\"{myinlineimage1.png}\" alt=\"image1\" border=\"0\"><br/>Some text<br/>This is inline image 2.<br/><img src=\"{myinlineimage2.jpg}\" alt=\"image2\" border=\"0\"><br/>Some more text<br/>Re-used inline image 1.<br/><img src=\"{myinlineimage1.png}\" alt=\"image3\" border=\"0\">","to":{"to@example.net":"to whom!"},"attachment": {"myfilename.pdf":"your_pdf_files_base64_encoded_chunk_data"},"from":["from@email.com","from email!"],"subject":"My subject","headers":{"Content-Type":"text/html; charset=iso-8859-1", "X-param1":"value1","X-param2":"value2", "X-Mailin-custom":"my custom value","X-Mailin-IP":"102.102.1.2", "X-Mailin-Tag":"My tag"},"inline_image":{"myinlineimage1.png":"your_png_files_base64_encoded_chunk_data", "myinlineimage2.jpg":"your_jpg_files_base64_encoded_chunk_data"}}' 'https://api.sendinblue.com/v2.0/email
想发送以下数据
$senddata = array (
'to' => array('sample_mail@live.com'=>'sample_mail@live.com'),
'from' => array($fromvalue,$fromvalue),
'replyto' => array("user_mail@live.com","user_mail@live.com"),
'subject' => "subject",
'text' => "text",
'html' => '',
'fromname' => $fromnamevalue,
'bcc' => 'bcc'
);