Skip to content

Forward Command

Forward a specific email to one or more recipients.

Synopsis

bash
mailos forward [email_number] [flags]

Description

The forward command allows you to forward a specific email from your inbox to one or more recipients. You can specify the email by its number (as shown in mailos search results), by its UID, or by its Message-ID.

The forwarded email includes the original message content with proper attribution, similar to standard email client forwarding behavior.

Options

  -a, --account string          Email account to use
      --bcc strings             BCC recipients
      --body string             Custom body text for the forward
      --cc strings              CC recipients
      --draft                   Save as draft instead of sending
      --file-body string        Read body text from file
  -h, --help                    Help for forward
  -i, --interactive             Interactive composition mode
      --message-id string       Message-ID to forward
      --number int              Email number to forward
      --subject string          Custom subject for forward
      --to strings              To recipients
      --uid uint32              Email UID to forward

Examples

Basic Forward

Forward email #2 to a single recipient:

bash
mailos forward 2 --to [email protected]

Forward to Multiple Recipients

Forward email #2 to multiple recipients:

bash
mailos forward 2 --to [email protected],[email protected]

Forward with Custom Message

Forward email #2 with additional message:

bash
mailos forward 2 --to [email protected] --body "FYI - thought you'd find this interesting"

Forward with CC and BCC

Forward email #2 with CC and BCC recipients:

bash
mailos forward 2 --to [email protected] --cc [email protected] --bcc [email protected]

Save Forward as Draft

Save the forward as a draft instead of sending immediately:

bash
mailos forward 2 --to [email protected] --draft

Interactive Forward

Compose the forward message interactively:

bash
mailos forward 2 --to [email protected] --interactive

Forward by UID

Forward an email by its IMAP UID:

bash
mailos forward --uid 1234 --to [email protected]

Forward by Message-ID

Forward an email by its Message-ID:

bash
mailos forward --message-id "<[email protected]>" --to [email protected]

Forward with File Body

Include message from a file:

bash
mailos forward 2 --to [email protected] --file-body message.txt

Output

The command provides feedback on the forwarding process:

📧 Forwarding: Subject of Original Email
   From: [email protected]
   Date: Jan 2, 2006 at 3:04 PM
   Message-ID: <[email protected]>
📤 Sending forward...
✓ Forward sent successfully!

If saving as draft:

✓ Forward saved as draft (UID: 5678)

Behavior

Forward Format

The forwarded email includes:

  • Your custom message (if provided)
  • A standard Apple Mail-style marker: "Begin forwarded message:"
  • Original email headers (From, Subject, Date, To, Reply-To when available)
  • Original email body

Email Identification

You can identify emails to forward using:

  1. Email number: As shown in mailos search output (most common)
  2. UID: IMAP unique identifier
  3. Message-ID: RFC 5322 Message-ID header

Subject Handling

  • If the original subject doesn't start with "Fwd:" or "Fw:", the prefix "Fwd: " is automatically added
  • You can override the subject completely using --subject

Interactive Mode

In interactive mode:

  • You can compose a custom message before the forwarded content
  • Type your message and press Enter twice to finish
  • The original message is automatically appended

Draft Mode

When using --draft:

  • The forward is saved both locally and to your IMAP Drafts folder
  • You can send it later using mailos send --drafts
  • The draft includes all recipients and content

Error Handling

Common errors and solutions:

Email Not Found

failed to find email #123: email with ID 123 not found
  • Verify the email number using mailos search
  • Ensure you're connected to the correct account

Missing Recipients

must specify either email number, UID, or Message-ID to forward
  • Provide at least one method to identify the email
  • Use --to flag to specify recipients

Authentication Issues

failed to authenticate: invalid credentials
  • Check your email credentials with mailos setup
  • Ensure app-specific passwords are configured if using 2FA
  • mailos search - Find emails to forward
  • mailos read - View email content before forwarding
  • mailos reply - Reply to an email instead of forwarding
  • mailos send - Send composed emails or drafts
  • mailos drafts - Manage draft emails

Released under the MIT License.