# Options
Learn more about how to configure the SDK. These options are set when the SDK is initialized
and passed to the init() function as an object.
You can also customize or overwrite it when the SDK method is called to process the request.
# publicKey
The public key is required to identify your account and is a required variable. You can obtain your public key from the Account (opens new window) page in the EmailJS dashboard.
Browser JavaScript
Node.js
Flutter
React Native
# privateKey
Additionally, a private key can be used for authorization if such an option is enabled on the Account - Security (opens new window) page.
Node.js
Flutter
# blockHeadless
When enabled, the SDK will not process request in headless browsers.
This option is turned off by default.
For headless browsers an error 451 - "Unavailable For Headless Browser" will be returned.
Browser JavaScript
# blockList
An object. This configuration controls whether requests are blocked for certain values in the variable. When the variable specified in watchVariable contains a value from the list, then requests won't be sent to EmailJS.
Name | Type | Description |
---|---|---|
list | String[] | The list of strings contains suspended values |
watchVariable | String | A name of the variable to be watched |
This option is turned off if one of the properties is not set.
If the value is in the list, the request method will return an error 403 - "Forbidden".
Browser JavaScript
Node.js
React Native
Flutter
# limitRate
An object. This option allows SDK to process requests no more often than specified in the throttle. / The rate limit is per page by default. To override the behavior, an id can be set. This ID can be useful in setting the throttle for each page, group, or whole application.
Name | Type | Description |
---|---|---|
id | String | (optional) Sets the throttle ID |
throttle | Number | (ms) After how many milliseconds a next request is allowed |
This option is turned off if throttle is 0 or not set.
Error 429 - "Too Many Requests" will be returned when the rate limit blocks the request.
Browser JavaScript
Node.js
React Native
Flutter