send test email from a specific SMTP

duffhome

Active Member
Hello guys,

I was wondering if there's a way in MW that will let me send test emails from a specific SMTP?

I think I can configure PowerMTA to route emails to specific IP, but it will need to map a header
like X-campaign-type: Test/Bulk or something like that. Do you guys have any plugin that does so?

Thanks
Iss
 
Hello guys,

I was wondering if there's a way in MW that will let me send test emails from a specific SMTP?

I think I can configure PowerMTA to route emails to specific IP, but it will need to map a header
like X-campaign-type: Test/Bulk or something like that. Do you guys have any plugin that does so?

Thanks
Iss
just choose one of your vMTAs as the DS for your test(s) in the campaign setup
 
Thanks for your response. how do I make that vmta send only tests emails? or how to make pmta distinguish between test emails and bulk emails?
 
how do I make that vmta send only tests emails? or how to make pmta distinguish between test emails and bulk emails?

this is off mwz

just create one for testing only
or
create a directive by email, ie FROM address, eg
TestEmail4pmta_vMTA97@...
it might need extra prioritization

but you could perhaps read the user guide
 
@frm.mwz Thank you for your response.
This is actually not for my personal sending. I have few clients I'm sending emails on their behalf. and I would like to keep the test emails sending from a specific smtp or mta.. I'm very familiar with pmta. I can not ask the users to use a specific from email. however if its possible that mailwizz can add [Preview] or [Test] in the subject line. or a X-type: Bulk/Test. would be better for me to create pattern list and route the emails that contain X-type: Bulk/Test [Preview] or [Test] to specific vmta
 
@frm.mwz Thank you for your response.
This is actually not for my personal sending. I have few clients I'm sending emails on their behalf. and I would like to keep the test emails sending from a specific smtp or mta.. I'm very familiar with pmta. I can not ask the users to use a specific from email. however if its possible that mailwizz can add [Preview] or [Test] in the subject line. or a X-type: Bulk/Test. would be better for me to create pattern list and route the emails that contain X-type: Bulk/Test [Preview] or [Test] to specific vmta

Since mwz v 1.3.7.2 you can dedicate DS to specific purposes, incl Email Test.

So if you allow your clients to choose between their regular and this test DS, then this might be a solution perhaps?
 
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.
 
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.

would be interesting to see if this custom header extension is still needed
 
@sendizo - (sorry, i did not read all thread).
From upcoming version you have this:
Screenshot 2016-10-19 11.34.59.png

So you will be able to only have servers for test emails ;) And only for reports, and only for list emails, and so on ;)
 
@twisted1919 "So you will be able to only have servers for test emails"
but, from customer end, where to choose this 'test server' when sending a test?

because, i just see (as customer) the "Campaign delivery servers" to pick up...
note: test server was created in the back end with the option 'use for email tests'
tks
 
Back
Top