Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Typology Rule for adding SMTP header

Avatar

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
sagil23995776
Level 2

20-08-2018

Hi,

I've implemented a List-Unsubscribe into a delivery template in the 'Additional SMTP headers' section.
It did work as expected but since I want it in all my delivery templates I wish to add it using a Typology rule.
I saw in the documentation that it is possible but couldn't figure out exactly how to do it using a Typology rule.

Does someone know how it can be achieved?

Thanks,

Sagi

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

20-08-2018

Hi Sagi,

You can use a code inside typology rule

delivery.mailParameters.headers inside the JS code will give you all the headers.

If you do a split

var headerLines = headers.split("\n");

you get an array of headers.

Create your custom header as

var newHeaderLine = header + ": " + value;

Add the new header line to the array

headerLines.push(newHeaderLine);

Finally, join them and assign to the main parameter

delivery.mailParameters.headers = headerLines.join("\n")

Regards,
Vipul

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 2
nielsr72948361
Level 2

Likes

14 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
nielsr72948361
Level 2

Likes

14 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
nielsr72948361
Level 2

10-04-2019

Hi Vipul,

I want to add a list unsubscribe header by using a typology rule useing this snippet.

There seems to be something wrong with the syntax, could you please look into this?

delivery.mailParameters.headers

var headerLines = headers.split("\n");

var newHeaderLine = header + ":mailto: " + errorAddress + "?subject=unsubscribe" + message.mimeMessageId;

headerLines.push(newHeaderLine);

delivery.mailParameters.headers = headerLines.join("\n")

Best regards

Niels

Avatar

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
sagil23995776
Level 2

21-08-2018

Hi Vipul,
Thanks for your answer, it helped

Cheers,

Sagi