That would help. I will need to update to the latest version. I m currently using: 1.3.6.5
I just found a script that twisted1919 gave me once. last year.
PHP:
<?php defined('MW_PATH') || exit('No direct script access allowed');
class CustomMailHeadersExt extends ExtensionInit
{
// name of the extension as shown in the backend panel
public $name = 'Custom mail headers';
// description of the extension as shown in backend panel
public $description = 'Add custom headers for emails';
// current version of this extension
public $version = '1.0';
// minimum app version
public $minAppVersion = '1.3.4.5';
// the author name
public $author = 'Cristian Serban';
// author website
public $website = 'http://www.mailwizz.com/';
// contact email address
public $email = 'cristian.serban@mailwizz.com';
// in which apps this extension is allowed to run
public $allowedApps = array('*');
// can this extension be deleted? this only applies to core extensions.
protected $_canBeDeleted = true;
// can this extension be disabled? this only applies to core extensions.
protected $_canBeDisabled = true;
// the extension model
protected $_extModel;
// run the extension
public function run()
{
Yii::app()->hooks->addFilter('delivery_server_before_send_email', function($params, $server) {
if (!isset($params['headers'])) {
$params['headers'] = array();
}
if (isset($params['headers']['X-Mw-Campaign-Uid'])) {
$params['headers']['X-Type'] = 'Campaign';
} else {
$params['headers']['X-Type'] = 'Preview';
}
return $params;
});
}
}
I will be testing it shortly and see if it will work.