getEnvironmentFromUrl function

GoMailerEnvironment? getEnvironmentFromUrl(
  1. String url
)

Helper function to get environment from URL (for debugging purposes)

Implementation

GoMailerEnvironment? getEnvironmentFromUrl(String url) {
  if (url.contains('go-mailer.com')) return GoMailerEnvironment.production;
  if (url.contains('gm-g7.xyz')) return GoMailerEnvironment.staging;
  if (url.contains('gm-g6.xyz')) return GoMailerEnvironment.development;
  return null; // Custom URL
}