1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > python提交表单发邮件_通过Mailgun和Python发送带有表单数据的电子邮件

python提交表单发邮件_通过Mailgun和Python发送带有表单数据的电子邮件

时间:2022-06-01 23:25:01

相关推荐

python提交表单发邮件_通过Mailgun和Python发送带有表单数据的电子邮件

我理解使用Python通过Mailgun API发送消息的基本知识以及来自我网站的请求,并且一切正常 . 我想使用request.forms.get('')附加HTML表单中的数据,但无法找出使其工作的语法 . 下面的链接正是我需要做的,除了Python而不是PHP .

如何通过Mailgun发送以下表单数据?

HTML FORM (Parts of it to get the point across)

...

...

ROUTE (Parts of it to get the point across)

@route('/send', method='POST')

def send_simple_message():

variable_I_need_to_send = request.forms.get('firstname')

...

data={...",

"to": "MyName ",

"subject": "Website Info Request",

"text": "Testing some Mailgun awesomness!",

"html": **variable_I_need_to_send**})

return '''

谢谢

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。