lib/mailjet-provider.js
function MailjetProvider(apiKey, apiSecret, options) {
	if (typeof apiKey !== 'string'
		|| typeof apiSecret !== 'string') {
		throw new Error('Invalid parameters');
	}

	options = options || {};

	if (typeof options.apiSecure === 'undefined')
		options.apiSecure = true;

	options.apiHostname = options.apiHostname || 'api.mailjet.com';
	options.apiPort = options.apiPort || (options.apiSecure ? 443 : 80);

	this.apiKey = apiKey;
	this.apiSecret = apiSecret;
	this.options = options;
}
function MailjetProvider(apiKey, apiSecret, options) {
	if (typeof apiKey !== 'string'
		|| typeof apiSecret !== 'string') {
		throw new Error('Invalid parameters');
	}

	options = options || {};

	if (typeof options.apiSecure === 'undefined')
		options.apiSecure = true;

	options.apiHostname = options.apiHostname || 'api.mailjet.com';
	options.apiPort = options.apiPort || (options.apiSecure ? 443 : 80);

	this.apiKey = apiKey;
	this.apiSecret = apiSecret;
	this.options = options;
}
function MailjetProvider ( apiKey , apiSecret , options ) { if ( typeof apiKey !== 'string' || typeof apiSecret !== 'string' ) { throw new Error ( 'Invalid parameters' ) ; } options = options || { } ; if ( typeof options . apiSecure === 'undefined' ) options . apiSecure = true ; options . apiHostname = options . apiHostname || 'api.mailjet.com' ; options . apiPort = options . apiPort || ( options . apiSecure ? 443 : 80 ) ; this . apiKey = apiKey ; this . apiSecret = apiSecret ; this . options = options ; }
Creates an instance of the Mailjet email provider.

@constructor
@this {MailjetProvider}
@param {string} apiKey API Key for the Mailjet account.
@param {string} apiSecret API Key for the Mailjet account.
@param {object} [options] Additional optional configuration.
@param {boolean} [options.apiSecure=true] API connection protocol - true = HTTPS, false = HTTP
@param {string} [options.apiHostname=api.mailjet.com] Hostname for the API connection
@param {number} [options.apiPort] Port for the API connection - defaults to match the protocol (HTTPS-443, HTTP-80)
Creates an instance of the Mailjet email provider .