Routing, Sending percentage

It can be done, question is how to do it the right way.

yes I understand that

let me try as well from my end

It will involve msg:set_meta(‘queue’, ‘smtp.mailgun.org’) it’s just a matter of where best to put it.

yes I was thinking the same way

because that’s the only way to do that

this should be use before getting smtp, received

Mike, can I make 2 queues.toml file?

You can. Just list both in the call to setup the queues helper.

You can use TOML or JSON.

ok

Mike, any idea how we can implement this?

Handling some customer requests and then I’ll get back to you with an answer

ok no worries, please take your time

mike can you let me know how can i pass the tenant header in swaks??

just one small example will help me

The man page should show how to add headers.

Use this code inside a condition that checks gmail as the destination in your smtp received event handler:

if math.random(0, 100) < 20 then -- 20% to mailgun
    msg:set_meta('routing_domain', 'smtp.mailgun.com')
end

ok let me try that

Hi @yearning-hyena