我想用“SendInBlue”发送交易和营销电子邮件。我也希望使用Python语言来实现这一点。我已经访问了SendInBlue的API文档,按照同样的程序,仍然没有成功地发送电子邮件。在
from mailin import Mailin
m = Mailin("https://api.sendinblue.com/v2.0","ScrWGqd296ya0CWq")
data = { "to" : {"aman@gmail.com":"to whom!"},
"from" : ["amandeep@gmail.com", "from email!"],
"subject" : "Subject...",
"html" : "This is the <h1>HTML</h1>",
"attachment" : ["https://example.com/path-to-file/filename1.pdf", "https://example.com/path-to-file/filename2.jpg"]
}
result = m.send_email(data)
print(result)
我还从github下载了mailinapi python并运行了这个脚本。我不知道在哪里设置我的smtp详细信息。在
**我只是出于安全目的更改了密钥。在
目前没有回答
相关问题 更多 >
编程相关推荐