Documentation Index: Fetch llms.txt first to discover every published page. This page is also available as Markdown at /go-forwarding-emails.md.
Verified · 8/11/2026

Forwarding Emails

Forward a received email to a new recipient with the Go SDK's Client.Forward, which builds a "Forwarded message" body from the original email and sends it as a new outbound message.

Use Client.Forward when you want to hand an inbound email off to someone who wasn't on the original thread, rather than replying to the sender. Reach for this instead of Client.Reply whenever the new recipient needs the original message content but isn't part of the existing conversation.

Under the hood, Forward is not a distinct API operation: it builds a SendParams value from the ReceivedEmail and calls Client.Send, so a forward is really a synthesized outbound send. See Sending Emails for the underlying delivery semantics (wait mode, idempotency).

What you need before forwarding#

Forward an inbound email#

  1. 1

    Call Client.Forward with the inbound email and a recipient#

    Pass the *ReceivedEmail you received and a ForwardParams with at least To:

    package main
    
    import (
    	"context"
    	"log"
    
    	primitive "github.com/primitivedotdev/sdks/sdk-go"
    )
    
    func handleForward(ctx context.Context, client *primitive.Client, email *primitive.ReceivedEmail) {
    	result, err := client.Forward(ctx, email, primitive.ForwardParams{
    		To:       "ops@example.com",
    		BodyText: "Can you take this one?",
    	})
    	if err != nil {
    		log.Printf("forward failed: %v", err)
    		return
    	}
    	log.Println(result.ID, result.Status)
    }
    
  2. 2

    Read the generated forwarded-message body#

    Forward prepends your BodyText (when set) to a generated block, then appends the original email's headers and text body:

    Can you take this one?
    
    ---------- Forwarded message ----------
    From: Alice <alice@example.com>
    To: support@example.com
    Subject: Order question
    Date: Tue, 14 Dec 2025 11:59:50 +0000
    Message-ID: <abc123@example.com>
    
    <original email text>
    

    The Date line only appears when the inbound email's headers included one; Message-ID only appears when the inbound thread had one.

  3. 3

    Verify delivery#

    Forward returns the same SendResult shape as Send: check result.Status and, when you cared enough to opt into wait mode, result.DeliveryStatus. Forward has no Wait option of its own, see the note below.

ForwardParams fields#

FieldRequiredBehavior
ToyesRecipient of the forwarded message. Validated as an email address.
BodyTextnoYour own note, prepended above the generated forwarded block.
SubjectnoOverrides the subject. Defaults to email.ForwardSubject (Fwd: <original subject>, idempotently prefixed).
FromnoOverrides the From address. Defaults to email.ReceivedBy (the address that received the inbound email).
IdempotencyKeynoDeduplicates retries the same way Client.Send does.
Tip

Forward routes through Client.Send internally, so the same request validation rules apply: To must be a syntactically valid address, and the SDK rejects a call before it reaches the network if not.

Warning

ForwardParams has no Wait field. If you need the first downstream SMTP delivery outcome for the forwarded message before your handler returns, call Client.Send directly with Wait set instead of Client.Forward.

Next steps#

Was this page helpful?

© Primitive SDKs

Powered by Browzer