Need a Fake SMTP Server?

SMTP Bucket captures all the e-mails it receives and makes them available over the web, or through our REST API. No more fake e-mail addresses, and no more spamming real customers with your test e-mails.

There's no need to sign-up or register. Just configure your mail client to use mail.smtpbucket.com, port 8025, and find your messages by sender or recipient here:

Our fake SMTP server is available at mail.smtpbucket.com on port 8025. Simply configure your application with those details and start sending e-mails as if it were any other mail server.

In Java, that might look something like this:

Properties properties = System.getProperties();
properties.setProperty("mail.smtp.host", "mail.smtpbucket.com");
properties.setProperty("mail.smtp.port", "8025");

Session session = Session.getDefaultInstance(properties);

MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress("sender@example.com"));
message.addRecipient(Message.RecipientType.TO, new InternetAddress("recipient@example.com"));
message.setSubject("This is the subject line!");
message.setText("This is the message body!");

Transport.send(message);

Then visit our website and find your message by providing either the sender or recipient.

Anyone can view any message captured by SMTP Bucket, so long as they know the e-mail address it was sent from or to, so bear that in mind before sending us anything confidential (of course, you aren't sending sensitive information by e-mail anyway, are you?).

Searching for a captured e-mail by sender address

When you've found your e-mail, you can view it in your browser. Et voila, an end-to-end e-mail integration test without a single fake e-mail address, and no risk of accidentally sending your test e-mail to a real customer.

Viewing a captured e-mail

If you prefer your testing to be automated, you can also search and view the e-mails we've captured using our REST API

> curl -G https://api.smtpbucket.com/emails --data-urlencode "sender=sender@example.com"

{
  "results": [
    {
      "id": "2c9080c356db0d5f0156db35315a0000",
      "sender": "sender@example.com",
      "recipients": [
        "recipient@example.com"
      ],
      "subject": "This is the subject line!",
      "timeCreated": 1472556512000
    }
  ]
}

> curl https://api.smtpbucket.com/emails/2c9080c356db0d5f0156db35315a0000

{
  "id": "2c9080c356db0d5f0156db35315a0000",
  "sender": "sender@example.com",
  "recipients": [
    "recipient@example.com"
  ],
  "subject": "This is the subject line!",
  "body": "From: sender@example.com\r\nTo: recipient@example.com\r\nMessage-ID: <51228289.0.1472556511530@My-PC.lan>\r\nSubject: This is the subject line!\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset=us-ascii\r\nContent-Transfer-Encoding: 7bit\r\n\r\nThis is the message body!\r\n",
  "timeCreated": 1472556512000
}