我正在尝试从 Mailgun 发布的退回电子邮件请求中获取数据,并将其放入错误日志中。但是,我找不到这样做的方法。
mailgun 的请求如下所示:
--127.0.0.1.1001.72643.1217418299.480.49
Content-Disposition: form-data; name="domain"
beta.mysite.mailgun.org
--127.0.0.1.1001.72643.1217418299.480.49
Content-Disposition: form-data; name="code"
605
--127.0.0.1.1001.72643.1217418299.480.49
Content-Disposition: form-data; name="description"
Not delivering to previously bounced address
--127.0.0.1.1001.72643.1217418299.480.49
Content-Disposition: form-data; name="my_var_1"
Mailgun Variable #1
--127.0.0.1.1001.72643.1217418299.480.49
Content-Disposition: form-data; name="reason"
hardfail
--127.0.0.1.1001.72643.1217418299.480.49
Content-Disposition: form-data; name="my-var-2"
awesome
我希望我的 Errorlogfile.txt 有这样的东西:
domain: beta.mysite.mailgun.org
code: 605
description: Not delivering to previously bounced address
my_var_1: Mailgun Variable #1
reason: hardfail
my-var-2: awesome
我不知道我的问题是否清楚,所以如果有任何问题,请向我询问。天呐!