我正在尝试使用Python从混合内容文档中提取多个XML元素.用例是包含电子邮件文本但包含多个XML树的电子邮件.
这是示例文档:
Email text email text email text email text.
email signature email signature.
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>
Email text email text email text email text.
email signature email signature.
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>
Email text email text email text email text. …Run Code Online (Sandbox Code Playgroud) 我正在尝试解决为什么GitLab Omnibus没有使用Postfix发送自动电子邮件,Postfix已经正确安装和配置(它也被安装在服务器上的其他应用程序使用).
当我对一个问题进行更改时,在拖尾Gitlab日志时,这就是我注意到的:
==>/var/log/gitlab/sidekiq/current <== 2015-04-03_20:06:30.79386 2015-04-03T20:06:30.793Z 8126 TID-aq3vk Sidekiq :: Extensions :: DelayedMailer JID-460531f571f6756908805d66 INFO :start 2015-04-03_20:06:31.53363 sendmail:不支持-t选项的收件人
==> /var/log/gitlab/gitlab-rails/production.log <==
发送邮件至user@company.com(48.3ms)
==>/var/log/gitlab/sidekiq/current <== 2015-04-03_20:06:31.57039 2015-04-03T20:06:31.570Z 8126 TID-aq3vk Sidekiq :: Extensions :: DelayedMailer JID-460531f571f6756908805d66 INFO :完成:0.776秒
我清理了电子邮件地址,但它正在发送到正确的地址.
我猜这个问题与"sendmail:不支持-t选项的收件人"有关
但是,我找不到有这个问题的其他人.
谢谢.