# From Name and From Address

{% hint style="warning" %}
**Updated 26 September 2023:** Postman will no longer be onboarding any new programmatic email API users and create custom from addresses till further notice.
{% endhint %}

{% hint style="info" %}
**Updated 27 August 2024:** Postman's default sender email address has been changed from `donotreply@mail.postman.gov.sg` to `info@mail.postman.gov.sg`
{% endhint %}

## From Name vs From Address

The `from` field of an email contains **from name** and **from address**. This is illustrated in the image below:

<figure><img src="https://4126954886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAQH3DF49Lq0AJudrbF%2Fuploads%2FfoqstFVY3gHc9BbVpeQy%2Ffrom_add.png?alt=media&#x26;token=52a510f9-a710-4e42-907c-38bba280b900" alt=""><figcaption></figcaption></figure>

Postman changed its default From Address from <mark style="color:red;">`donotreply@postman.gov.sg`</mark> to <mark style="color:red;">`info@postman.gov.sg`</mark> on 27 Aug 2024.&#x20;

### API users using <mark style="color:red;">`info@postman.gov.sg`</mark> as their From Address

If the `from` field in the JSON body of the API call is omitted:

1. The from name defaults to `Postman.gov.sg`
2. The from address defaults to `<info@mail.postman.gov.sg>`

### API users using <mark style="color:red;">`donotreply@postman.gov.sg`</mark> as their From Address

If your agency has **previously hardcoded** <mark style="color:red;">`donotreply@postman.gov.sg`</mark> and wish to continue using <mark style="color:red;">`donotreply@postman.gov.sg`</mark> as your From Address

* there is no code change thats needs to be done on your code base
* take note that your From Address **will still remain as** <mark style="color:red;">`donotreply@postman.gov.sg`</mark>

## Changing From Name

In our API, the from name of an email can be changed by the API user by modifying the `from` field in the API call. For example, to use `New Product` as the from name, the API user could use the following JSON body:

```json
{
  "recipient": "zixiang@open.gov.sg",
  "subject": "Hello there",
  "body": "What's upppp",
  "from": "New Product <info@mail.postman.gov.sg>"
}
```

The email recipient will see the following:

<figure><img src="https://4126954886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAQH3DF49Lq0AJudrbF%2Fuploads%2FhYVYs2di3zLT7eV2U4bh%2Fnew%20product.png?alt=media&#x26;token=3a77dd98-de61-48b4-93b0-2abe7bae14e2" alt=""><figcaption></figcaption></figure>

For users that wish to customise their emails without going through the hassle of setting up a [custom from address](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api/custom-from-address), this is an intermediate solution used by our existing users.

## Using a Custom From Address

Users may wish to send emails using a custom from name as well as a custom from address (i.e. any email address that is not the default `<info@mail.postman.gov.sg>`. Setting up a custom from address is necessary; for more information, [see here](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api/custom-from-address).

{% hint style="info" %}
Create an account on Postman using the email address from which you wish to send your email.

For example, if you want your email to be sent from <mark style="color:red;">`no-reply@agency.gov.sg`</mark>, you should log into Postman using this email address and generate your API keys on the dashboard.
{% endhint %}

To make use of the custom from address, the JSON body of the API call is:

```json
{
  "recipient": "zixiang@open.gov.sg",
  "subject": "Hello there",
  "body": "What's upppp",
  "from": "New Product <info@mail.postman.gov.sg>"
}
```

The recipient will see:

1. A custom from name `New Product`
2. A custom from address `<test_admin@postman.gov.sg>`

![](https://4126954886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAQH3DF49Lq0AJudrbF%2Fuploads%2Fgit-blob-d67809253126eab267a2fa863e7ffafc48f1cb04%2Fcustom-domain.png?alt=media)
