Since I just saw yet another developer use '1.2.3.4' in an example configuration, a reminder that you MUST NOT use publicly routable addresses that you do not control in your code.

Instead, use one of the available 'TEST-NET' IPv4 or IPv6 ranges documented in RFC 6890, such as;

192.0.2.0/24
198.51.100.0/24
203.0.113.0/24

❌ 1.2.3.4
✅ 192.0.2.4

Pass it on to all of your fellow developers, documentation writers, and so forth.

Full RFC is here;

https://datatracker.ietf.org/doc/rfc6890/

RFC 6890: Special-Purpose IP Address Registries

This memo reiterates the assignment of an IPv4 address block (192.0.0.0/24) to IANA. It also instructs IANA to restructure its IPv4 and IPv6 Special-Purpose Address Registries. Upon restructuring, the aforementioned registries will record all special-purpose address blocks, maintaining a common set of information regarding each address block.

IETF Datatracker

The same goes for domain names; do NOT use a public domain name you do not control in your configuration, documentation, or UI language.

Instead, use one of the available reserved domain names documented in RFC 2606, such as 'example.com', 'example.net', or the .example top-level domain.

❌ test.com
❌ yourdomain.com
✅ example.com
✅ yourdomain.example

Pass it on to your fellow developers, designers, documentation writers, and so forth.

Full RFC text is here;

https://datatracker.ietf.org/doc/html/rfc2606

RFC 2606: Reserved Top Level DNS Names

To reduce the likelihood of conflict and confusion, a few top level domain names are reserved for use in private testing, as examples in documentation, and the like. In addition, a few second level domain names reserved for use as examples are documented. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.

IETF Datatracker

Oh, and please, if you are sending email, don't make up random addresses for your app to test with. Only send mail to addresses you know are valid, and for which you have permission to send mail.

If you need to test SMTP while developing software, use a mock SMTP server that drops all outgoing email in a local directory, so you can inspect it without dumping a metric ton of email in your upstream's SMTP queue.

If you absolutely must generate unique email addresses for testing, either register a domain for that purpose and set up mail handling for it, or use the .test TLD, and knock yourself out with as many unique domain names and addresses as you like.

Seriously, though; mock SMTP server. Don't be spewing your test noise onto the wider internets.

@sindarina that's absolutely mandatory. In my young days, I didn't do it and sent a lot of emails to a customer's account during a stressful debug session. I was unbelievably lucky they just laughed at my expletives 😨