getMockingMessage method

String? getMockingMessage()

Gets a random mocking message if this email is from a disposable/temporary service.

Returns null if the email is not disposable, otherwise returns a random mocking message to display to users attempting to sign up with temp mail.

Example:

final result = await client.validateEmail('user@tempmail.com');
if (result.disposable) {
  final message = result.getMockingMessage();
  print(message); // "Nice try! But we're not falling for that temporary email trick. 😏"
}

Implementation

String? getMockingMessage() {
  if (!disposable) return null;
  return _getRandomTempMailMessage();
}