Start a mailbox move
start_moveCopies all e-mail (every folder) from old mailboxes to new ones: one mailbox, or up to 50 in one move (mailboxes), e.g. a whole team or company. Nothing is deleted or changed in the old mailboxes; messages already in a new mailbox are not copied twice. mail2mail first logs in to every mailbox and counts the messages, then copies by itself (several mailboxes at the same time) and checks that every message arrived. Afterwards it keeps copying new mail for follow_days (default 7), because mail still reaches the old mailbox until the switch of the address (MX records) has spread; this only adds messages to the new mailbox and never changes or deletes anything there. The passwords are stored encrypted so that only the move's token (its private link) can unlock them, for resync_move; they are deleted with the move (forget_move, or 30 days after its last activity). While the copy, the follow-up or a resync_move runs, the server can read the mail and use the passwords. So recommend app passwords where the provider offers them: they can be revoked at any time. Before calling, show the user the terms (https://mail2mail.link/terms) and the privacy notice (https://mail2mail.link/privacy), and get their OK. Set accept_terms only after they agree. Use app passwords where the provider needs them (Gmail, iCloud, Yahoo; find_mail_server says so). Microsoft 365 / Outlook.com mailboxes can't use a password: leave that password empty and give the user the returned progress_url so they can click “Sign in with Microsoft”. Several mailboxes: put them in one move (mailboxes) rather than one move each; one token, one progress page, and the mailboxes copy in parallel. You may also call start_move several times (separate moves, e.g. different options); they run at the same time. Give the user progress_url, their private page to watch or stop the move, or for several moves the moves_url that move_status returns for all their tokens (one page with every move). Then follow them with move_status (wait_seconds lets it wait for the next change instead of polling). Also pass on the returned notice about statistics. When the address stays the same and only the provider changes (or both addresses have the same domain), set new_server to the new provider's IMAP server (ask the user; it is in the new provider's setup instructions): looking it up from the address finds the old provider, and such a move is refused. The service is free; please don't abuse it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"accept_terms": "<accept_terms>"
},
"name": "start_move"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | Optional: only copy messages received after this day (YYYY-MM-DD). | |
| exclude | No | Optional folder names (or patterns with *) not to copy, e.g. ["Spam", "Trash"]. | |
| language | No | Optional: language of the pages linked in the answer (default en). | |
| mailboxes | No | Several mailboxes in one move (up to 50), instead of the single old_/new_ fields. Each entry has the same fields; old_server / new_server above apply to entries that leave them empty. If some entries are wrong, nothing is started and the error names each one (mailboxes[i]). | |
| new_email | No | One mailbox: address of the mailbox to copy to. | |
| old_email | No | One mailbox: address of the mailbox to copy from. For several, use mailboxes instead. | |
| new_server | No | IMAP server of the new mailbox; with mailboxes, the default for entries without one. Strongly recommended, and required when both addresses have the same domain (e.g. the same address at a new provider); otherwise found automatically. | |
| old_server | No | Optional IMAP server name of the old mailbox (e.g. imap.example.com); with mailboxes, the default for entries without one. If empty, it is looked up from the address, which finds the server the domain points to today. | |
| follow_days | No | Optional: after the copy, keep copying new mail from the old mailbox for this many days (0 = off, default 7). Leave the default unless the user says otherwise: mail sent to the address can still arrive at the old mailbox for hours to days after the switch. If the server reboots in that time, the follow-up continues at the next call with the token (e.g. move_status). Use 0 if the user won't need the old mailbox after the copy (the passwords stay stored for resync_move until forget_move). resync_move can start it again later. | |
| accept_terms | Yes | true only after the user has seen and accepted the terms and the privacy notice. | |
| new_password | No | One mailbox: password or app password of the new mailbox (empty for Microsoft). | |
| new_username | No | One mailbox: optional login name, only if it is not the e-mail address. | |
| old_password | No | One mailbox: password or app password of the old mailbox (empty for Microsoft). | |
| old_username | No | One mailbox: optional login name, only if it is not the e-mail address. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||