Custom from & reply-to

Is it possible to customize “reply-to” and “from” when sending email via “send_message” API?

Hi @boris :wave:

You have two options when adding email fields. You can customize email fields in the channel settings for your notification template, or you can include the email fields you want displayed in an override schema in your send request.

Hi Rodrigo

We are using Courier’s Ruby Gem and sending via “send()” API (using events).

Tried passing the “override” part in any way I could think, but the “from” field is ignored:

  'override' => {
    'from' => 'a@test.com',
    'sendgrid' => {
      'from' => 'b@test.com',
    },
    'channels' => {
      'email' => {
        'override' => {
          'from' => 'c@test.com',
        }
      }
    }

Did anyone succeed in overwriting “from” in “event based” sending?

Try using this schema and replace sendgrid with the provider you’re using for email.

Seems the documentation there is not matching the Ruby Gem API.

We got “event” instead of “template”. “recipient” instead of “to->email”.

Tried adding this to the sent data, without any success (or errors).

  'providers' => {
    'sendgrid' => {
      'override' => {
        'from' => {
          'email' => 'someone@somewhere.com'
        },
      }
    }
  }

[We tried both from->email = and just from =, both didn’t work].

Is this a limitation of the ruby gem?

Not sure if a limitation, but the schema requires a body parameter for sendgrid.

Seems we managed to get it working, thank you for your help Rodrigo!