File: //usr/local/mailchannels/hooks/PostRpmVersionsExim.php
<?php
namespace MailChannels;
class PostRpmVersionsExim extends Hook {
public function execute($hookData) {
try {
if ($this->outboundEnabled() && $this->outboundConfig->enableMailManHeaders()) {
$this->outboundSMTPService->addMailManHeaders();
return array(true, "added the X-MC-MailingList header");
}
return array(true, "not adding the X-MC-MailingList header; not configured to do so");
} catch (\Exception $e) {
return array(false, "an exception occurred adding the X-MC-MailingList header: $e");
}
}
public static function category() {
return "RPM::Versions";
}
public static function event() {
return "exim";
}
public static function stage() {
return "post";
}
}