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:

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:

{
    "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:

Last updated