通过卷曲开MAILGUN发送HTML

问题描述 投票:2回答:2

我试图通过电子邮件发送此。我尝试了很多办法,总是我obteined同样的事情:一个错误。

http://goto-21.net/campaign/htmlversion?mkt_hm=0&AdministratorID=47507&CampaignID=58&StatisticID=62&MemberID=733807&s=994508d6292a660150ccc60c3f0310d4&isDemo=0

我试着用这样的:

卷曲-s --user 'API:密钥3ax6xnjp29jd6fds4gc373sgvjxteol0' \ Xhttps://api.mailgun.net/v2/samples.mailgun.org/messages \ -F从= '激发用户' \ -F到='富@ example.com '\ -F cc='[email protected]' \ -F bcc='[email protected]” \ -F主题= '你好' \ -F文本= '测试一些Mailgun awesomne​​ss!' \ -F HTML = '代码在这里' \

和这个:

卷曲-s --user 'API:密钥3ax6xnjp29jd6fds4gc373sgvjxteol0' \ Xhttps://api.mailgun.net/v2/samples.mailgun.org/messages \ -F从= '激发用户' \ -F到='富@ example.com '\ -F cc='[email protected]' \ -F bcc='[email protected]” \ -F主题= '你好' \ -F文本= '测试一些Mailgun awesomne​​ss!' \ --form字符串的html = '代码在这里' \

但它不工作。总是“”语法错误“”

任何人都可以帮我吗?

谢谢!

html curl mailgun
2个回答
2
投票

使用以下cURL命令发送使用命令行HTML电子邮件。换成你自己的大写参数,你准备送!

curl -s --user 'api:YOUR-API-KEY' https://api.mailgun.net/v2/YOURDOMAIN/messages -F from='[email protected]' -F [email protected] -F subject='Hello World with HTML' -F html='<html><head><title>Hello</title></head><body>Hello <strong>World</strong></body></html>' -F text='Hello world'

这样做是从发送HTML和纯文本版本的回落连接到您的域到接收器的地址发送一封电子邮件!

快乐mailgunning

最好,


0
投票

起源请求的样子:

curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
    https://api.mailgun.net/v3/samples.mailgun.org/messages \
    -F from='Excited User <[email protected]>' \
    -F to='[email protected]' \
    -F subject='Hello' \
    -F text='Testing some Mailgun awesomeness!'

但你必须之前HTTPS大X。

curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \ 
-------> X <----- https://api.mailgun.net/v2/samples.mailgun.org/messages \ -F from='Excited User ' \ -F to='[email protected]' \ -F cc='[email protected]' \ -F bcc='[email protected]' \ -F subject='Hello' \ -F text='Testing some Mailgun awesomness!' \ --form-string html=' CODE HERE ' \

也许这会导致错误

© www.soinside.com 2019 - 2024. All rights reserved.