Docs
Handle skipped recipients
What Mailset leaves out of product email, and what to tell the person.
Mailset leaves a few kinds of address out of your product's email. It doesn't refuse the message: everyone else gets it, and the receipt names who was skipped and why.
Who is skipped
reason | Who | Why |
|---|---|---|
private_relay | Apple's Hide My Email, from Sign in with Apple | It bounces email from senders an app never registered with Apple |
disposable | A temporary inbox | Nobody reads it, and writing to it hurts your sender |
unsubscribed | Someone who opted out of this sender's promotional email | They asked. Only promotional email is skipped |
Forwarding addresses people choose on purpose, such as Firefox Relay, DuckDuckGo and SimpleLogin, are never skipped.
Read the receipt
const message = { from, to: user.email, subject, text };
const sent = await mailset.send(message);
for (const skipped of sent.skipped ?? []) {
if (skipped.reason === 'unsubscribed') continue;
await askForAnotherAddress(user, skipped.reason);
}
message: SendInput = {
"from": sender,
"to": user["email"],
"subject": subject,
"text": text,
}
sent = mailset.send(message)
for skipped in sent.get("skipped", []):
if skipped["reason"] == "unsubscribed":
continue
ask_for_another_address(user, skipped["reason"])
import (
"context"
"log"
mailset "mailset.app/go"
)
message := mailset.Message{
From: from,
To: []string{user.Email},
Subject: subject,
Text: text,
}
sent, err := client.Send(ctx, message)
if err != nil {
log.Fatal(err)
}
for _, skipped := range sent.Skipped {
if skipped.Reason == "unsubscribed" {
continue
}
askForAnotherAddress(user, skipped.Reason)
}
sent = mailset.send_email(
from: from, to: user[:email],
subject: subject, text: text
)
(sent.skipped || []).each do |skipped|
next if skipped.reason == 'unsubscribed'
ask_for_another_address(user, skipped.reason)
end
$message = [
'from' => $from,
'to' => $user['email'],
'subject' => $subject,
'text' => $text,
];
$sent = $mailset->send($message);
foreach ($sent->skipped as $skipped) {
if ($skipped->reason === 'unsubscribed') {
continue;
}
askForAnotherAddress($user, $skipped->reason);
}
Message message = Message.builder()
.from(from)
.to(user.email())
.subject(subject)
.text(text)
.build();
Sent sent = mailset.send(message);
for (Skipped skipped : sent.skipped()) {
if (skipped.reason().equals("unsubscribed"))
continue;
askForAnotherAddress(user, skipped.reason());
}
let message = Message::builder()
.from(FROM)
.to(user.email)
.subject(SUBJECT)
.text(TEXT);
let sent = mailset.send(message).await?;
for skipped in &sent.skipped {
if skipped.reason == SkipReason::Unsubscribed {
continue;
}
let reason = skipped.reason.as_str();
ask_for_another_address(&user, reason).await;
}
Without an SDK, the same list is data.skipped in the answer:
{
"ok": true,
"data": {
"id": "out_3f9a1c0e7b2d",
"state": "sent",
"sendAt": 1800000000000,
"skipped": [
{
"address": "moc.dielppa.yaleretavirp@m4dq9p2k7x",
"reason": "private_relay"
}
]
}
}
skipped is absent when nobody was skipped. When it names every recipient, nothing went out and the answer still says sent, so check it before you tell someone to look in their inbox.
What to tell the person
private_relay: "We can't reach this address. Add another email to your account." At sign-up, ask for an address when Apple hands you a relay one.disposable: ask for a real address before you create the account.unsubscribed: nothing. They chose it.
Watch out
- A skip isn't a bounce. It costs your key nothing, and there is nothing to retry.
- The delivery log says
skippedfor each one. - Email sent with
keepCopy: true, such as a support reply, still goes to these addresses, so you can answer someone who wrote from one.