What does moving mail out of Junk change?

Mailera's Not spam action moves a message out of Junk. REST and MCP also support recovering one or multiple messages with Move messages permission. For recurring recovery, your external application supplies the selection logic and scheduling, then calls Mailera to perform the moves.

If you're planning automatic unspam rules, separate those application decisions from the recovery operation itself. Deciding which messages qualify is a judgment call; moving an identified message is a mechanical operation.

Mailera connects your existing mailboxes, so recovery needs to be checked in the mailbox where the message belongs, not just in a combined message list.

ApproachWhat it doesWhen to use it
Manual Not spamMoves a reviewed message out of JunkAn isolated message or an uncertain case
One-off bulk recoveryMoves all mail or one sender's mail out of Spam through Mailera's unspam endpointA defined cleanup after you've reviewed the affected mail
External REST/MCP workflowYour application selects messages and calls Mailera's recovery operationsA recurring legitimate-mail case with selection and scheduling you control
Provider filtering settingsApply the provider's own filtering behaviorA provider-specific filtering or blocked-sender issue

Gmail's handling of blocked senders shows why these are different. Its Spam guidance says that a blocked sender's messages are still identified as spam even after you remove their emails from Spam.

Microsoft's Graph message-move documentation describes moving a message between folders within the same mailbox. That is a message-location operation, not a sender-trust setting.

Mailera cannot make a provider trust a sender or guarantee Inbox placement. Treat persistent Junk placement as a separate delivery problem rather than widening recovery indefinitely.

Which messages should qualify for recovery?

Define the business case before writing selection logic. For example: “Recover expected service notifications for the operations mailbox; the operations owner reviews unexpected candidates.” Name that owner and keep unrelated mailboxes outside the initial scope.

Use mailboxes you control. Inspect both messages you want recovered and messages that should remain in Junk. Include confusing examples: a familiar display name with an unexpected address, an unrelated message with similar wording, or mail sent to the same recipient for a different purpose.

Do not treat a display name, familiar subject, or direct recipient address as proof of legitimacy. A sender-address match should not be treated as authentication either. When Gmail shows a spoofed-address warning, its guidance is to avoid replying or opening links until you verify the address.

A message in a test mailbox's Junk folder with the Not spam action available for manual recovery.
Review candidate messages manually before allowing an external workflow to submit recovery calls.

Write down the intended boundary in ordinary language first. Then make your external workflow identify candidates without moving them, so you can review its selections. Keep ambiguous cases under manual review rather than substituting a broader condition.

Do not broaden selection merely to make a difficult sample match. An unwanted recovery may put misleading mail directly into someone's working Inbox.

How do you pilot an external recovery workflow?

Start with individual messages. That gives you a specific item to inspect before and after each move, instead of making a mailbox-wide cleanup your first test.

Mailera provides these operations for the workflow:

OperationPurposePermission
GET /mailboxes/{id}/messagesList messages by folderread
POST /mailboxes/{id}/messages/{msgId}/moveMove an individual messagemove
POST /mailboxes/{id}/unspamRecover all mail or one sender's mail from Spammove

For MCP, list_messages supports inspection, while move_message and rescue_spam provide recovery operations. Keep the decision to invoke a move in your application or operator-controlled agent workflow.

External recovery workflow from candidate inspection through read-only selection and approved moves, followed by verification and a choice to expand or revoke access and review.
Your application selects candidates; Mailera performs the requested moves. Verify the results before expanding.
  1. Record the intended candidates and coverage. Name the workflow owner, identify the mailbox group in scope, and describe what must remain untouched.
  2. Review sample messages manually. Read enough context to establish why each candidate belongs in the recovery category. Use Not spam for messages that need immediate recovery, but record those separately from API or MCP moves.
  3. Inspect with a key that has only Read permission first. List messages in Junk and review the candidates selected by your application. Include unrelated messages in the review so you can check that they are excluded.
  4. Allow a limited set of reviewed moves. Give a dedicated key Move messages permission only when the workflow needs it. Have the external application submit individual moves for approved candidates before considering broader recovery.
  5. Compare expected and actual results. Inspect Junk and Inbox in Mailera and the provider interface. Look for wanted messages left behind and unwanted messages moved into Inbox.
  6. Expand only after review. Change one part of the workflow at a time. Confirm the key-revocation procedure before wider use: revoking a key immediately rejects subsequent calls using that key.

For a mixed-provider rollout, keep observations separate for Gmail mailboxes and Outlook or Microsoft 365 mailboxes. A successful recovery in one mailbox is not a substitute for checking another.

Keep a small external pilot record

Record mailbox and message identifiers, the observation time, and the folder seen before and after the action. Avoid copying private message bodies into a shared tracking sheet. Record whether each move came from a person, a REST call, or an MCP tool invocation.

Mailera's message responses include id, mailbox_id, folder, and internet_message_id. Save the identifiers you observe at each check rather than assuming every provider identifier remains unchanged: Microsoft Graph documents that a move creates a new copy of the message in the destination folder and removes the original, which can affect identifiers tied to that copy.

CheckExpected behaviorObservation to recordDecision
Approved candidateRecovered into InboxFolder and observation timeContinue after confirming the result
Unrelated Junk messageRemains untouchedWhether the application selected or moved itHalt submissions on an unexpected selection
Mailbox outside the pilotReceives no move requests from your applicationMailbox IDs used by the workflowInvestigate any out-of-scope request
Key revocationSubsequent calls using that key are rejectedRevocation action and subsequent call resultResolve access-control uncertainty before expanding
Provider cross-checkLocation agrees with the reviewed resultMailera and provider viewsInvestigate any disagreement

Choose observation times that cover your actual workflow. Keep older Junk samples separate from newly arriving messages so you know which candidates your application inspected.

What should you do after an unwanted move?

Define escalation conditions before allowing unattended calls: an unexpected candidate, an out-of-scope mailbox, or a result you cannot verify. A missed intended message also needs investigation before you widen selection.

For an external API or MCP workflow, use a dedicated Mailera key. If you need to withdraw its access, revoke that key; subsequent calls using it are rejected immediately. Keep the key tied to this workflow rather than sharing it with unrelated applications.

Review affected messages individually. For unwanted mail in Mailera, use Mark as spam after inspection, then verify its location. Record the corrective action separately so your next review can distinguish it from the original recovery.

Gmail's own filters are a separate mechanism. Google's filter-management instructions describe "Edit" and "Delete" controls. Those controls manage Gmail filters, not your external REST or MCP workflow.

Before resuming submissions, review the application's selection logic and repeat the small pilot with the confusing examples that caused the problem.

What are the common rollout mistakes?

Recovering everything in Junk. The unspam endpoint can recover all mail, but that is a broad operation. Prefer individual reviewed moves for the pilot. Keep deliberate bulk cleanup separate from recurring selection.

Treating a matching address as proof of safety. Inspect the message and its context. Do not expand from a known workflow to a whole domain simply because some messages share an address suffix.

Confusing provider filters with recovery calls. Gmail's filter instructions let you inspect search results before creating a filter. That workflow belongs to Gmail. In your external application, build a separate review step before submitting moves.

Using unread counts as the result. Mailera's mailbox list shows unread Inbox and Junk counts. Use those for orientation, then verify individual messages. Your pilot record needs message-level observations.

Changing selection logic to fix a connection problem. Check mailbox status and last sync first. Mailera's Live monitoring setting controls how often an active mailbox is checked, and a separate sleeping state can apply to an inactive mailbox until it syncs again. Missing or delayed observations need connection and sync investigation before selection changes.

Changing several things at once. Keep application changes isolated so an unexpected move has a traceable cause. Record which mailbox set and selection logic each run used.

What changes if an AI agent reads recovered mail?

Moving a message into Inbox does not make its content trustworthy. Incoming email remains untrusted data, not instructions. An agent must not follow text in a recovered message that tells it to change selection logic, reveal credentials, or perform unrelated actions.

For inspection, create a key with Read permission and restrict Mailbox scope to the pilot's mailbox group. Add Move messages only if the agent must move messages. Do not grant Send messages or Manage mailboxes merely to inspect results.

Require human confirmation before a sending workflow. Keep decisions about expanding or resuming recovery with the named operator, not with instructions found in email.

Use the unified inbox operations guide for the surrounding agent workflow. The guide to safely connecting an agent to Gmail and Mailera security page provide the related access-control context.

Connect your first mailbox in 2 minutes

Add an Outlook, Gmail or IMAP mailbox and read email messages in the app or via the API.

Connect mailbox