# Send test emails

> Simulate delivered, bounced, complained, and suppressed events with MailBlastr test addresses — without harming your domain reputation.

While building your integration it is important to exercise the different deliverability outcomes — a delivery, a hard bounce, a spam complaint, a suppressed recipient. MailBlastr provides reserved **test addresses** that trigger each event reliably, so you can verify your [webhooks](https://www.mailblastr.com/docs/webhooks/overview), event handling, and suppression logic without mailing real people.

> **Warning:** Do not test by inventing fake addresses or pointing at a throwaway SMTP server — both can hurt your domain reputation. Use the addresses below instead.

> **Note:** Test sends still count against your account’s sending quota and produce real [email objects](https://www.mailblastr.com/docs/emails/managing) with a full event log.

## Available test addresses

| Address | Simulates |
| --- | --- |
| `delivered@mailblastr.dev` | A successful delivery — the email advances to `delivered`. |
| `bounced@mailblastr.dev` | A hard bounce (an SMTP `550 5.1.1` "Unknown User"). The email moves to `bounced` and the recipient is [auto-suppressed](https://www.mailblastr.com/docs/emails/bounces). |
| `complained@mailblastr.dev` | The message is delivered but the recipient marks it as spam — a `complained` event, and the recipient is suppressed. |
| `suppressed@mailblastr.dev` | The recipient is already on your [suppression list](https://www.mailblastr.com/docs/emails/suppressions), so the send is skipped with status `suppressed`. |

## Send to a test address

**Node.js**

```js
import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.emails.send({
  "from": "Acme <hello@yourdomain.com>",
  "to": ["bounced@mailblastr.dev"],
  "subject": "Testing a bounce",
  "html": "<p>This should hard-bounce.</p>"
});
console.log({ data, error });
```

**Ruby**

```ruby
require "mailblastr"

Mailblastr.api_key = "mb_xxxxxxxxx"

Mailblastr::Emails.send({
  "from": "Acme <hello@yourdomain.com>",
  "to": [
    "bounced@mailblastr.dev"
  ],
  "subject": "Testing a bounce",
  "html": "<p>This should hard-bounce.</p>"
})
```

**PHP**

```php
$mailblastr = Mailblastr::client('mb_xxxxxxxxx');

$mailblastr->emails->send([
  'from' => "Acme <hello@yourdomain.com>",
  'to' => [
    "bounced@mailblastr.dev"
  ],
  'subject' => "Testing a bounce",
  'html' => "<p>This should hard-bounce.</p>"
]);
```

**Python**

```python
import mailblastr

mailblastr.api_key = "mb_xxxxxxxxx"

mailblastr.Emails.send({
  "from": "Acme <hello@yourdomain.com>",
  "to": [
    "bounced@mailblastr.dev"
  ],
  "subject": "Testing a bounce",
  "html": "<p>This should hard-bounce.</p>"
})
```

**Go**

```go
import "github.com/shekhu10/mailblastr-sdks/mailblastr-go"

client := mailblastr.NewClient("mb_xxxxxxxxx")

params := &mailblastr.SendEmailRequest{
    From:    "Acme <hello@yourdomain.com>",
    To:      []string{"delivered@example.com"},
    Subject: "hello world",
    Html:    "<p>it works!</p>",
}
sent, err := client.Emails.Send(params)
```

**Rust**

```rust
use mailblastr::{Mailblastr, CreateEmailBaseOptions};

let mb = Mailblastr::new("mb_xxxxxxxxx");

let email = CreateEmailBaseOptions::new(
    "Acme <hello@yourdomain.com>",
    ["delivered@example.com"],
    "hello world",
).with_html("<p>it works!</p>");
let _sent = mb.emails.send(email).await?;
```

**Java**

```java
import com.mailblastr.*;

Mailblastr mailblastr = new Mailblastr("mb_xxxxxxxxx");

SendEmailRequest request = SendEmailRequest.builder()
    .from("Acme <hello@yourdomain.com>")
    .to("delivered@example.com")
    .subject("hello world")
    .html("<p>it works!</p>")
    .build();
mailblastr.emails().send(request);
```

**.NET**

```csharp
using Mailblastr;

IMailblastr mailblastr = MailblastrClient.Create("mb_xxxxxxxxx");

var resp = await mailblastr.EmailSendAsync(new EmailMessage
{
    From = "Acme <hello@yourdomain.com>",
    To = "delivered@example.com",
    Subject = "hello world",
    HtmlBody = "<p>it works!</p>",
});
```

**cURL**

```bash
curl -X POST 'https://api.mailblastr.com/emails' \
  -H 'Authorization: Bearer mb_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "Acme <hello@yourdomain.com>",
  "to": ["bounced@mailblastr.dev"],
  "subject": "Testing a bounce",
  "html": "<p>This should hard-bounce.</p>"
}'
```

**CLI**

```bash
mailblastr emails send \
  --from 'Acme <hello@yourdomain.com>' \
  --to 'bounced@mailblastr.dev' \
  --subject 'Testing a bounce' \
  --html '<p>This should hard-bounce.</p>'
```

## Labeling test runs

The `delivered`, `bounced`, and `complained` addresses support **plus-labeling**: add any string after a `+` (e.g. `delivered+signup@mailblastr.dev`) and the event still fires, but the recipient address now identifies that specific test run. This is useful for correlating webhook callbacks back to the flow that triggered them.

```text
delivered+signup@mailblastr.dev
delivered+password-reset@mailblastr.dev
bounced+import-batch@mailblastr.dev
```

> **Warning:** The `suppressed@mailblastr.dev` address does not support labeling.
