Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When sending an HTML mail from Rules, I am now getting the notice "Undefined index: Reply-To in SendGridMailSystem->mail()" - interesting thing is that I am provided a reply-to value in the rule itself, which makes me think maybe there is something wrong with the way the rules action is integrating with the SendGridMailSystem class?
Comment | File | Size | Author |
---|---|---|---|
#18 | 2848810-7.x-reply-to-fix.patch | 699 bytes | webadpro |
#15 | sendgrid-mail.patch | 956 bytes | astolfivincent |
Comments
Comment #2
Perignon CreditAttribution: Perignon commentedHrm. I will add this to the stack of things to look at. I am in the middle of updating the PHP wrapper to version 3 of the API.
Comment #3
Perignon CreditAttribution: Perignon commentedComment #4
Perignon CreditAttribution: Perignon commentedCan you supply more information from your PHP logs that may show the line number where the problem is occurring? We do not have an explicit rules integration so what you are using is something inherent to Rules. So it is hard for me to reproduce this problem.
Also, if possible, give me explicit steps to reproduce the error. That would greatly help.
Thanks!
Comment #5
supergecko28 CreditAttribution: supergecko28 as a volunteer commentedThe problem appears to be that sendgrid api expects a "reply-to", and the integration expects "Reply-To". Rules sends the address as reply-to, but somewhere along the line (according to my error log it's line 277 in sendgrid_integration.module), they get mixed up. The emails will still send out with the correct reply-to address, but the user will get the above mentioned error.
I was able to fix the error by generating a new mail class.inc using MailSystem, and modifying the mail function like this (note there is also a fix in here for sending attachments via rules as well, which wasn't working for me originally either):
Comment #6
Perignon CreditAttribution: Perignon commentedLike I said above, it would help most if someone could give me explicit steps to reproduce this bug. If I cannot reproduce it is hard to fix it. If you give me a patch, that would help as well.
Comment #7
Perignon CreditAttribution: Perignon commentedI understand the Reply-To problem. Drupal core capitalizes the "R" and "T" in the $message array, but Rules does not.
I am about to commit something that should fix that.
As to the attachment problem, start a new issue for that and give me details (like reproducibility :-) )
Comment #9
Perignon CreditAttribution: Perignon commentedThis has to be ported to 8.x branch too
Comment #11
Perignon CreditAttribution: Perignon commentedThis should fix this. The code already accounted for "from" and "From" so I used the same logic so it should function appropriately. Need to get some review/use of this before marking fixed.
Comment #12
Perignon CreditAttribution: Perignon commentedComment #14
gregori.goossens CreditAttribution: gregori.goossens as a volunteer commentedHi,
for the Drupal 7 version, we have :
i think code should be :
because due to && takes precedence over || and if $message['headers']['Reply-To'] is set (this is the case with test mail form), we don't init $message['headers']['reply-to'].
thks
Comment #15
astolfivincent CreditAttribution: astolfivincent as a volunteer and commentedThis issue is not resolved. The fix in #14 that @gregori.goossens provided is working for me. I'm requesting that this issue be re-opened and that this patch be evaluated:
All credit for the patch goes to @gregori.goossens
Comment #16
astolfivincent CreditAttribution: astolfivincent as a volunteer and commentedThis issue is not resolved. The fix in #14 that @gregori.goossens provided is working for me. I'm requesting that this issue be re-opened and that this patch be evaluated:
Comment #17
webadpro CreditAttribution: webadpro commented#8 didnt fix it for me, but #14 sure did.
Thanks @gregori.goossens.
Comment #18
webadpro CreditAttribution: webadpro commentedHere's a patch
Comment #19
Perignon CreditAttribution: Perignon commentedI pushed the changes to dev but they are not showing up here for some reason.