Skip to content

Instantly share code, notes, and snippets.

@TonyVlcek
Created October 5, 2018 10:15
Show Gist options
  • Save TonyVlcek/722941402520599f3e9d6bb3a84cff53 to your computer and use it in GitHub Desktop.
Save TonyVlcek/722941402520599f3e9d6bb3a84cff53 to your computer and use it in GitHub Desktop.
On staging or local environment you typically want to have real data for testing but you want to make sure not to send out test messages to real clients. By running this snippet all the client's email addresses will be predictably transformed to @mailinator.com public addresses.
UPDATE client SET email = CONCAT(REPLACE(email, '@', '-'), '@mailinator.com');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment