[5.6] Rename setGlobalTo to setGlobalToAndRemoveCcAndBcc#24917
Conversation
It's really counter intuitive to have a setter destroy unrelated data, best to be honest and complete about it.
|
If I'm remembering correctly, this has been discussed before. The global "to" address exists jug for development for the purpose of replacing any recipients, so that emails don't get sent to someone accidentally while developing. IMO, the current behavior is correct. On the other hand, other devs have mentioned this before, so I guess there's room for discussion. I'll try to find the old issue /pr related to this. |
|
Ha, this PR was a little tongue in cheek, no real motivation other than to work out my own frustration for banging up against this. The documentation does a pretty good job of saying that the 'Universal To' is meant for local development. I was using it in a "real" app I made for a family member that sends one email as a sort of 'contact us' submission. With that said, the method name is certainly more accurate now :) |
setGlobalTo to setGlobalToAndRemoveCcAndBccsetGlobalTo to setGlobalToAndRemoveCcAndBcc
I spent a bunch of time earlier tonight trying to figure out why the
ccaddressee I was setting in myMailablewasn't receiving a copy of the email I was sending. Turns out thesetGlobalTomethod in theMailerremoves theccandbccrecipients.This change may prevent future devs from banging their heads against this.