Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/mail#32 - Making mailing test email non-case-sensitive #13392

Merged

Conversation

martinh-pw
Copy link
Contributor

As per https://lab.civicrm.org/dev/mail/issues/32

Added call to strtolower() when processing the user-provided test email addresses for a mailing. Updated MailingTest.php:testMailerSendTest_email to use a mixed-case email.

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@civibot
Copy link

civibot bot commented Jan 3, 2019

(Standard links)

@civibot civibot bot added the master label Jan 3, 2019
@colemanw
Copy link
Member

colemanw commented Jan 3, 2019

@civicrm-builder add to whitelist

@eileenmcnaughton
Copy link
Contributor

test fail is unrelated

@eileenmcnaughton
Copy link
Contributor

@martinh-pw this doesn't cover ALL scenarios - ie. if the email in the database is not lower case then you could get a new email added still. However, I am going to merge this & let you decide whether you want to address that as a follow up because

  1. lower case for emails is pretty much the standard & it seems OK to priorise that as the best-handled scenario
  2. this is better than the status quo IMHO
  3. there is unit test coverage on the change you made.

Congrats on your first merged PR I think?

@eileenmcnaughton eileenmcnaughton merged commit 75d01ce into civicrm:master Jan 3, 2019
@tschuettler
Copy link
Contributor

@eileenmcnaughton Are there actually instances where the email in the database may end up not beeing lower case? I was under the impression that it is always stored as lower case.

@martinh-pw
Copy link
Contributor Author

Thanks @eileenmcnaughton :)

Yes, same as @tschuettler my understanding was that emails in the db are already expected to be lowercase. Regardless, I've added some further tweaks to account for that possibility:

#13401

@eileenmcnaughton
Copy link
Contributor

@tschuettler @martinh-pw don't we just save them as entered?

@martinh-pw
Copy link
Contributor Author

I know that if you enter an email address on the Add Contact page, or inline on the Contact page, civi will convert it to lower. I don't know if that happens in all cases, but it seems likely it would happen as a general rule. That's not exactly a definitive answer though!

@tschuettler
Copy link
Contributor

@eileenmcnaughton I don't think so. At least I could not find any way to create a non-lowercase email (tested with CSVImport, apiv3, apiv4, GUI edit). There is none in our datebase aswell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants