<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Alert e-mail has no Date: field in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-e-mail-has-no-Date-field/m-p/109137#M1594</link>
    <description>&lt;P&gt;I have gotten alerts to work in Splunk, and they send e-mails. But, unfortunately, there is no Date: field among the e-mail headers.&lt;/P&gt;

&lt;P&gt;Almost all other e-mails I get have this Date: field, and it is used to sort them. Without a date, the alerts get sorted to the wrong end of my e-mails, which is not helpful.&lt;/P&gt;

&lt;P&gt;I have looked at python.log, and don't notice anything.&lt;/P&gt;

&lt;P&gt;What might be wrong?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Nov 2011 00:56:10 GMT</pubDate>
    <dc:creator>mmather67</dc:creator>
    <dc:date>2011-11-16T00:56:10Z</dc:date>
    <item>
      <title>Alert e-mail has no Date: field</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-e-mail-has-no-Date-field/m-p/109137#M1594</link>
      <description>&lt;P&gt;I have gotten alerts to work in Splunk, and they send e-mails. But, unfortunately, there is no Date: field among the e-mail headers.&lt;/P&gt;

&lt;P&gt;Almost all other e-mails I get have this Date: field, and it is used to sort them. Without a date, the alerts get sorted to the wrong end of my e-mails, which is not helpful.&lt;/P&gt;

&lt;P&gt;I have looked at python.log, and don't notice anything.&lt;/P&gt;

&lt;P&gt;What might be wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:56:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-e-mail-has-no-Date-field/m-p/109137#M1594</guid>
      <dc:creator>mmather67</dc:creator>
      <dc:date>2011-11-16T00:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Alert e-mail has no Date: field</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-e-mail-has-no-Date-field/m-p/109138#M1595</link>
      <description>&lt;P&gt;Well, I fixed this myself, by editing  splunk/etc/apps/search/bin/sendemail.py.&lt;/P&gt;

&lt;P&gt;About line 17, before TIMEOUT=600, I added the line:&lt;/P&gt;

&lt;P&gt;from time import strftime, gmtime, time&lt;/P&gt;

&lt;P&gt;About line 145, before the comment # Clear leading / trailing whitespace ... I added the line:&lt;/P&gt;

&lt;P&gt;message ['Date'] = strftime ("%a, %d %b %Y %H:%M:%S", gmtime (time()))&lt;/P&gt;

&lt;P&gt;That seems to work -- now I just have to remember to make a similar change to any update of Splunk.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2011 16:12:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-e-mail-has-no-Date-field/m-p/109138#M1595</guid>
      <dc:creator>mmather67</dc:creator>
      <dc:date>2011-11-16T16:12:23Z</dc:date>
    </item>
  </channel>
</rss>

