# Forward Received Email

> POST /emails/receiving/:id/forward — forward a received email (with its attachments) to another address.

`POST /emails/receiving/:id/forward`

Forwards a received email to another address through the normal send pipeline. The original subject, body, and attachments are re-sent (inline images keep their `content_id` so they still render). `from` must be an address on one of your verified domains — it is validated exactly like [POST /emails](https://www.senddart.com/docs/api/emails-send).

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The id of the received email to forward. |

**Body parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `to` | string | string[] | Yes | The address(es) to forward to. |
| `from` | string | Yes | A verified sending address. |
| `subject` | string | No | Optional; overrides the original subject. |

**Node.js**

```js
import { SendDart } from 'senddart';

const mb = new SendDart('mb_xxxxxxxxx');

const { data, error } = await mb.emails.receiving.forward('4ef9a417-02e9-4d39-ad75-9611e0fcc33c', {
  "to": "delivered@test.senddart.com",
  "from": "Acme <hello@yourdomain.com>"
});
console.log({ data, error });
```

**Ruby**

```ruby
require "senddart"

SendDart.api_key = "mb_xxxxxxxxx"

SendDart::Emails::Receiving.forward("4ef9a417-02e9-4d39-ad75-9611e0fcc33c", {
  "to": "delivered@test.senddart.com",
  "from": "Acme <hello@yourdomain.com>"
})
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendDart\SendDart;

$senddart = SendDart::client('mb_xxxxxxxxx');

$senddart->emails->receiving->forward('4ef9a417-02e9-4d39-ad75-9611e0fcc33c', [
  'to' => "delivered@test.senddart.com",
  'from' => "Acme <hello@yourdomain.com>"
]);
```

**Python**

```python
import senddart

senddart.api_key = "mb_xxxxxxxxx"

senddart.Emails.Receiving.forward("4ef9a417-02e9-4d39-ad75-9611e0fcc33c", {
  "to": "delivered@test.senddart.com",
  "from": "Acme <hello@yourdomain.com>"
})
```

**Go**

```go
import "github.com/shekhu10/senddart-sdks/senddart-go"

client := senddart.NewClient("mb_xxxxxxxxx")

forwarded, err := client.Emails.Receiving.Forward("4ef9a417-02e9-4d39-ad75-9611e0fcc33c", &senddart.ForwardReceivedEmailRequest{
    To:   []string{"delivered@test.senddart.com"},
    From: "Acme <hello@yourdomain.com>",
})
```

**Rust**

```rust
use senddart::{ForwardReceivedEmailOptions, SendDart};

let mb = SendDart::new("mb_xxxxxxxxx");

let params = ForwardReceivedEmailOptions::new(
    "Acme <hello@yourdomain.com>",
    ["delivered@test.senddart.com"],
);
let _forwarded = mb.emails.receiving.forward("4ef9a417-02e9-4d39-ad75-9611e0fcc33c", params).await?;
```

**Java**

```java
import com.senddart.SendDart;
import com.senddart.SendDartResponse;
import com.senddart.requests.ForwardEmailRequest;

SendDart senddart = new SendDart("mb_xxxxxxxxx");

ForwardEmailRequest request = ForwardEmailRequest.builder()
        .to("delivered@test.senddart.com")
        .from("Acme <hello@yourdomain.com>")
        .build();

SendDartResponse response = senddart.emails().receiving().forward(
        "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
        request);
```

**.NET**

```csharp
using SendDart;

ISendDart senddart = SendDartClient.Create("mb_xxxxxxxxx");

var resp = await senddart.ReceivedEmailForwardAsync("4ef9a417-02e9-4d39-ad75-9611e0fcc33c", new ReceivedEmailForwardOptions
{
    To = "delivered@test.senddart.com",
    From = "Acme <hello@yourdomain.com>",
});
```

**cURL**

```bash
curl -X POST 'https://www.senddart.com/api/emails/receiving/4ef9a417-02e9-4d39-ad75-9611e0fcc33c/forward' \
  -H 'Authorization: Bearer mb_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "to": "delivered@test.senddart.com",
  "from": "Acme <hello@yourdomain.com>"
}'
```

**CLI**

```bash
senddart emails receiving forward 4ef9a417-02e9-4d39-ad75-9611e0fcc33c \
  --to 'delivered@test.senddart.com' \
  --from 'Acme <hello@yourdomain.com>'
```

## Response

```json
{
  "object": "email",
  "id": "6278820d-2421-42d0-85f0-80e9e28c1c69"
}
```

The response is the outbound email's id — the forward is sent like any other email and shows up in your sent mail and logs. Attachments whose bytes were not retained (e.g. inbound storage was off when the mail arrived) are skipped rather than failing the forward. Returns `not_found` (404) if the received email does not exist for your account, and `missing_required_field` (422) when `to` or `from` is omitted. See the [error reference](https://www.senddart.com/docs/api/errors).
