Problem/Motivation

When I try to send an email with Sendgrid I discovered that the reply to param is named differently than the one we are checking now on.

if (isset($params['Reply-To']) && !empty($params['Reply-To'])) {
    $message['headers']['Reply-To'] = $params['Reply-To'];
  } 

Steps to reproduce

When going to /admin/config/services/sendgrid/test
you fill in your email and the reply to, if you debug your code in sendgrid_integration.module, I noticed reply is not in $params['Reply-to'] but in $params['reply_to']

Proposed resolution

Adding extra check for other reply to param

 if (isset($params['Reply-To']) && !empty($params['Reply-To'])) {
    $message['headers']['Reply-To'] = $params['Reply-To'];
  } else if (isset($params['reply_to']) && !empty($params['reply_to'])) {
    $message['headers']['Reply-To'] = $params['reply_to'];
  }

Comments

Dietger created an issue. See original summary.

Dietger’s picture

Version: 8.x-1.x-dev » 8.x-1.2
Dietger’s picture

I've added a patch that includes an extra check for the reply_to param.

perignon’s picture

Looks good. I'll get it in.

  • Perignon committed 326d8e7 on 8.x-1.x authored by Dietger
    Issue #3182212 by Dietger: Sendgrid reply to param different than one...
perignon’s picture

Status: Active » Fixed

Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.