⚙️ Email Sndr / Client Settings
Send Emails at Lightning Speed.
About email client settings
What is this for?
When using the feature to send emails from the Dymo API, you will need to set up some configuration parameters to authenticate that it is you and the email you are sending it from.
Usage
Once we have created and configured our API object, it is quite simple, we just need to execute the following code.
import DymoAPI from "dymo-api";
const dymo = new DymoAPI({
apiKey: "PRIVATE_TOKEN_HERE",
serverEmailConfig: {
host: "smtp.company.com",
port: 587,
secure: false,
auth: {
user: "no-reply", // Remember that the user can also be the email or any.
pass: process.env.NOREPLY_EMAIL_PASSWORD
},
// Optional but recommended.
dkim: {
domainName: "company.com"
keySelector: process.env.DKIM_KEY_SELECTOR
privateKey: process.env.DKIM_PRIVATE_KEY
}
}
});
Parameters
You can see the configuration parameters in detail here.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | String | ✅ | SMTP Server |
port | String | ✅ | SMTP Server Port |
secure | Boolean | ✅ | SMTP Server Protection (only if the SMTP server allows it) |
auth | Auth | ✅ | React Component (you must choose between this type or html) |
dkim | DKIM | ❌ | Signature DKIM security validation |
Types
Auth
| Parameter | Type | Required | Description |
|---|---|---|---|
user | String | ✅ | SMTP Server Auth User |
pass | String | ✅ | SMTP Server Auth User Password |
DKIM
DKIM (DomainKeys Identified Mail) is an email authentication method designed to verify that a message has not been altered in transit and that it truly comes from the domain it claims to be sent from.
DKIM adds a unique digital signature to the email headers, generated by a private key owned by the sending server, while the public key is published in the domain's DNS records.
Receiving mail servers can use this public key to validate the authenticity of the email. DKIM is essential for protecting your domain's reputation, improving email deliverability, and preventing spoofing, a common technique in phishing attacks.
| Parameter | Type | Required | Description |
|---|---|---|---|
domainName | String | ✅ | SMTP Server Domain (not subdomain) |
keySelector | String | ✅ | DKIM Key Selector |
privateKey | String | ✅ | DKIM Privarte Selector |