Additional settings for Postmark smtp service provider

3 years 6 months ago #1 by Casper
Hello Christopher,

I just bought the plugin and contracted the smpt provider Postmark for sending my emails.
Maybe to much at once, but Postmark has for bulk sending (newsletter) other creditals as the default ones. In this case the smtp server address is different.
They also require an additional smtp header: X-PM-Message-Stream: stream-id for newsletters.
For the moment I added the header in de code in lib.php, but that is not good for upward compatibility.
For the server address I put the broadcast address in the Joomla settings panel, but then they are treated as bulk by Postmark.
Is it possible to implement this in the code?
Kind regards,
Casper

Please Log in or Create an account to join the conversation.

3 years 6 months ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic Additional settings for Postmark smtp service provider
Hi again Casper.

Can you please tell me what did you add at lib.php and on what lines?
I could add a textarea option for additional headers in the newsletter.

Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

3 years 6 months ago #3 by Casper
On line 1225 I inserted:
  $mail->AltBody = strip_tags($body);

  // Add additional header
  $mail->AddCustomHeader("X-PM-Message-Stream: newsletter");

and on line 1295 I inserted:
    $mheader .= "NSPro-SendingTo: <$recipient>\r\n";
  
    // insert additional header
    $mheader .= "X-PM-Message-Stream: newsletter\r\n";

I don't know if I did it right, but the smpt provider didn't complain anymore afterwards.

Kind regards,

Please Log in or Create an account to join the conversation.

3 years 2 months ago #4 by Christopher Mavros
Replied by Christopher Mavros on topic Additional settings for Postmark smtp service provider
Hello Casper!
I just wanted to let you know that within a few days I will release NS Pro version 3, which will include the ability to add custom headers in the Component Options, so that you may easily add this header, without editing the code.

Thanks again!

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros