I'm doing a sample email program in java that uses the SMTP protocol to send email and attachments. Unfortunately, most of them require authentication and I'd rather not deal with that additional complexity. Does anyone know of a free provider I can sign up with which has an smpt server that doesn't need authentication?
-
1Check this out https://mailtrap.io/ – Isanka Wijerathne Jul 12 '17 at 07:56
2 Answers
You're asking for an open relay; those are abused by spammers and get shut down pretty quickly.
Your ISP might have a mailserver which will accept mails from you without authentication if you're coming from their IP range, but even that's fairly unusual these days.
You could install an MTA (mail transfer agent) locally for testing purposes.
However, if you have e.g. an @gmail.com
address you want to send mails for to test, sending your mail without authentication to Google's MX servers for example, gmail-smtp-in.l.google.com
) will work, as they're accepting the mail for local delivery.
(The general rule being that you only accept mail via SMTP without authentication that's for local delivery to a mailbox, or or possibly from an IP range you control and trust; anything else should be authenticated, otherwise you end up unwittingly being used by spammers to relay spam.)

- 6,544
- 1
- 24
- 31
-
2For anyone reading this in the future: gmail unfortunately [requires encrypted connections](http://stackoverflow.com/questions/1516754/connecting-to-smtp-gmail-com-via-command-line) now. – dshepherd Oct 14 '14 at 10:11
You could install a small fake SMTP server like Dumbster (open source, written in Java).

- 58,567
- 58
- 222
- 373