uSend Docs
Sending

Send with SMTP

Send through usend from any app, framework or CMS that speaks SMTP, using your API key as the password.

Anything that can send email over SMTP can send through usend: WordPress, Laravel, Django, Rails, Nodemailer, a printer, a cron job. SMTP submissions go through the same pipeline as the API, so sandbox rules, quotas, suppressions, tracking, events and webhooks behave exactly the same, and the email shows up in your dashboard logs.

You can also copy these settings from Settings → SMTP in the dashboard.

Settings

SettingValue
Hostsmtp.usend.et
Port587 (STARTTLS) or 465 (implicit TLS)
EncryptionRequired. Plain connections and port 25 are not offered.
Usernameusend (any value works; it is ignored)
PasswordYour API key, for example us_123456789
AuthenticationPLAIN or LOGIN

Use a sending_access key for SMTP. Both full_access and sending_access keys are accepted, and a key limited to one domain can only send from that domain.

Note

The server never offers authentication before the connection is encrypted. A client that tries to log in over a plain connection is disconnected before it can send the key.

Examples

Nodemailer
// npm install nodemailer
import nodemailer from 'nodemailer';

const transport = nodemailer.createTransport({
  host: 'smtp.usend.et',
  port: 465,
  secure: true, // use port 587 with secure: false for STARTTLS
  auth: { user: 'usend', pass: process.env.USEND_API_KEY },
});

await transport.sendMail({
  from: 'Acme <[email protected]>',
  to: '[email protected]',
  subject: 'Hello from usend',
  html: '<p>It works!</p>',
});

For WordPress, use any SMTP plugin with the settings above. In tools with a "security" dropdown, choose TLS/STARTTLS for 587 and SSL for 465.

What is supported

  • Content: HTML, plain text, or both, with attachments (up to 40 MB per message in total).
  • Recipients: up to 50 per message across To, Cc and Bcc. Envelope recipients that are not in To or Cc are sent as Bcc.
  • Headers: Reply-To, List-Unsubscribe and List-Unsubscribe-Post, and any X- header, are kept. Other headers are replaced by usend's own.
  • From address: it must be on a verified domain of your organization, as with the API.
  • Rate limit: the same 10 messages per second per key as the API. Over the limit the server answers 421 and a well-behaved client retries.
  • Scheduling, templates, tags, idempotency keys and batch sending are API features. Use the REST API for those.

The server answers 250 once usend has accepted the message for delivery, the same moment the API returns an id. Delivery results arrive later as events and webhooks. SMTP does not return the email id: find the email in the dashboard, or use the API when you need it.

Errors

ReplyMeaningWhat to do
535 Invalid API keyThe password is not a valid key.Check the key, and that it was not deleted.
554 with a messageusend refused the message: the domain is not verified, the organization is suspended or restricted, the key is limited to another domain, and so on.Read the message; it is the same text the API returns. Do not retry.
452A quota or a recipient limit was reached.Wait, or raise your limits.
421Rate limit exceeded.Retry after a moment.
451Temporary failure on usend's side.Retry.
552The message is larger than 40 MB.Send smaller attachments.

Checking the connection

Shell
openssl s_client -starttls smtp -connect smtp.usend.et:587 -crlf
openssl s_client -connect smtp.usend.et:465

Both show a valid certificate for smtp.usend.et. If your network blocks outbound ports 465 and 587, use the REST API over HTTPS instead.