What is SMTP Bucket?

SMTP Bucket is a fake SMTP server that makes no attempt to deliver e-mails to their intended recipients. Instead, we store them in our database and make them available through our website and REST API.

 

Why would I use it?

Mainly to verify your own applications are capable of sending e-mails successfully via a remote SMTP server, without any risk of spamming real people with your test e-mails.

Our REST API also opens up the possibility of programmatically verifying your e-mails are being sent as part of an automated test scenario.

 

How do I use it?

Have your application connect to mail.smtpbucket.com on port 8025 as if it was any other SMTP Server. Here's a complete example in Java:

import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

import java.util.Properties;

public class EmailExample {
    public static void main(String... args) throws Exception {
        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 you can find your message by sender or recipient on our website or through our REST API