smtp server address for testing [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionI'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?
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.)
You could install a small fake SMTP server like Dumbster (open source, written in Java).
精彩评论