> For the complete documentation index, see [llms.txt](https://guide.nomsa.gov.kh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.nomsa.gov.kh/api-guide/programmatic-email-api/send-email-api/from-name-and-from-address.md).

# From Name and From Address

## 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://2152951736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokkzQYtJVcUXvcEivC85%2Fuploads%2FYBUiCgq4sos1xz5WEtr1%2Fcustom-from-name-1.jpg?alt=media&amp;token=652d33d7-e128-4247-bde7-937a3c2b483b" alt=""><figcaption></figcaption></figure>

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

1. The from name defaults to Nomsa
2. The from address defaults to `<donotreply@mail.nomsa.gov.kh>`

## 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": "recipient@gmail.com",
    "subject": "Hello I am testing",
    "body": "Thanks for atending, Hope you are doing well.",
    "from": "Nomsa <donotreply@mail.nomsa.gov.kh>"
}
```

The email recipient will see the following:

<figure><img src="https://2152951736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokkzQYtJVcUXvcEivC85%2Fuploads%2FfDX2iNsM6RyQjrOKaT3J%2Ffrom-name-4.jpg?alt=media&amp;token=d74c4e04-07c1-48c8-ad35-c92f20ebbc07" alt=""><figcaption></figcaption></figure>
