rebrand to useSend (#210)
This commit is contained in:
@@ -5,12 +5,12 @@ description: "Fundamental concepts of Usend's API."
|
||||
|
||||
## Base URL
|
||||
|
||||
Unsend's API is built on REST principles and is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
|
||||
useSend's API is built on REST principles and is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
|
||||
|
||||
The Base URL for all API endpoints is:
|
||||
|
||||
```sh Terminal
|
||||
https://app.unsend.dev/api/
|
||||
https://app.usesend.com/api/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
@@ -21,4 +21,4 @@ Authentication to Usend's API is performed via the Authorization header with a B
|
||||
Authorization: Bearer us_12345
|
||||
```
|
||||
|
||||
You can create a new token/API key under your Unsend [Developer Settings](https://app.unsend.dev/dev-settings/api-keys).
|
||||
You can create a new token/API key under your useSend [Developer Settings](https://app.usesend.com/dev-settings/api-keys).
|
||||
|
@@ -2,11 +2,11 @@
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"version": "1.0.0",
|
||||
"title": "Unsend API"
|
||||
"title": "useSend API"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://app.unsend.dev/api"
|
||||
"url": "https://app.usesend.com/api"
|
||||
}
|
||||
],
|
||||
"components": {
|
||||
@@ -1479,4 +1479,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -57,9 +57,9 @@ func main() {
|
||||
request := &unsend.SendEmailRequest{
|
||||
To: []string{"youremail@gmail.com"},
|
||||
From: "hello@yourdomain.com",
|
||||
Subject: "Unsend test email",
|
||||
Subject: "Unsend test email",
|
||||
Text: "hello,\n\nUnsend is the best open source sending platform",
|
||||
Html: "<p>hello,</p><p>Unsend is the best open source sending platform</p><p>check out <a href='https://unsend.dev'>unsend.dev</a></p>",
|
||||
Html: "<p>hello,</p><p>Unsend is the best open source sending platform</p><p>check out <a href='https://unsend.dev'>unsend.dev</a></p>",
|
||||
}
|
||||
|
||||
response, err := client.Emails.SendEmail(context.Background(), *request)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Create AWS credentials
|
||||
description: Step by step guide to create AWS credentials to self-host Unsend.
|
||||
description: Step by step guide to create AWS credentials to self-host useSend.
|
||||
---
|
||||
|
||||
<Steps>
|
||||
|
@@ -1,12 +1,12 @@
|
||||
---
|
||||
title: Local Development
|
||||
description: "A guide on how to run Unsend’s codebase locally"
|
||||
description: "A guide on how to run useSend’s codebase locally"
|
||||
icon: code
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
Unsend's codebase is fully [open-source on github](https://github.com/unsend-dev/unsend)
|
||||
useSend's codebase is fully [open-source on github](https://github.com/usesend/usesend)
|
||||
|
||||
Here is the codebase structure
|
||||
|
||||
@@ -27,7 +27,7 @@ The `apps` directory contains the code for:
|
||||
|
||||
- `web`: Code for our dashboard and email infra
|
||||
|
||||
- `marketing`: The code for the landing page of Unsend
|
||||
- `marketing`: The code for the landing page of useSend
|
||||
|
||||
- `docs`: The documentation that you are currently reading.
|
||||
|
||||
@@ -35,7 +35,7 @@ The `packages` directory contains the code for:
|
||||
|
||||
- `eslint-config` package contains shared ESLint configuration settings
|
||||
|
||||
- `sdk` package contains typescript sdk for unsend rest api
|
||||
- `sdk` package contains TypeScript SDK for useSend REST API
|
||||
|
||||
- `tailwind-config` This package contains a shared Tailwind CSS configuration.
|
||||
|
||||
@@ -43,9 +43,9 @@ The `packages` directory contains the code for:
|
||||
|
||||
- `ui` This package is a collection of reusable UI components like buttons, badges, etc
|
||||
|
||||
## Running Unsend locally
|
||||
## Running useSend locally
|
||||
|
||||
To run Unsend, locally you will need to setup the following:
|
||||
To run useSend locally, you will need to setup the following:
|
||||
|
||||
- [AWS](https://aws.amazon.com/) Free tier account will work.
|
||||
|
||||
@@ -57,13 +57,13 @@ To run Unsend, locally you will need to setup the following:
|
||||
|
||||
<Steps>
|
||||
<Step title="Fork the repo">
|
||||
Click on the fork button on [GitHub](https://github.com/unsend-dev/unsend) to fork the repo
|
||||
Click on the fork button on [GitHub](https://github.com/usesend/usesend) to fork the repo
|
||||
</Step>
|
||||
<Step title="Clone the repo">
|
||||
Once the repo is forked you can clone it on your local machine using:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/your-username/unsend.git
|
||||
git clone https://github.com/your-username/usesend.git
|
||||
```
|
||||
|
||||
</Step>
|
||||
@@ -107,7 +107,7 @@ openssl rand -base64 32
|
||||
variables. for development email link will logged in the console.
|
||||
</Note>
|
||||
|
||||
Next, [create a new GitHub App](https://github.com/settings/applications/new). This will allow you to sign in to Unsend with your GitHub account.4
|
||||
Next, [create a new GitHub App](https://github.com/settings/applications/new). This will allow you to sign in to useSend with your GitHub account.
|
||||
|
||||
Add the homepage as:
|
||||
|
||||
@@ -131,7 +131,7 @@ Once the app is added you can add the Client ID under `GITHUB_ID`and CLIENT SECR
|
||||
will not be sent out.
|
||||
</Note>
|
||||
|
||||
Next, we need to add in the [AWS credentials](https://docs.unsend.dev/get-started/create-aws-credentials). Follow the detailed guide to get the AWS credentials with accurate permissions and add them in:
|
||||
Next, we need to add in the [AWS credentials](https://docs.usesend.com/get-started/create-aws-credentials). Follow the detailed guide to get the AWS credentials with accurate permissions and add them in:
|
||||
|
||||
```
|
||||
AWS_ACCESS_KEY=<access-key-id>
|
||||
@@ -141,7 +141,7 @@ AWS_SECRET_KEY=<secret-access-key>
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Running Unsend locally
|
||||
## Running useSend locally
|
||||
|
||||
We are using a local Postgresql server and a local Redis server. But if you don't have docker you can also manually set these up.
|
||||
|
||||
|
@@ -1,13 +1,13 @@
|
||||
---
|
||||
title: NodeJS
|
||||
description: "Send your mail using unsend in NodeJS"
|
||||
description: "Send your mail using useSend in NodeJS"
|
||||
icon: node-js
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Unsend API key](https://app.unsend.dev/dev-settings/api-keys)
|
||||
- [Verified domain](https://app.unsend.dev/domains)
|
||||
- [useSend API key](https://app.usesend.com/dev-settings/api-keys)
|
||||
- [Verified domain](https://app.usesend.com/domains)
|
||||
|
||||
## Using SDK
|
||||
|
||||
@@ -15,48 +15,48 @@ icon: node-js
|
||||
<Step title="Install SDK">
|
||||
<CodeGroup>
|
||||
```bash npm
|
||||
npm install unsend
|
||||
npm install usesend
|
||||
```
|
||||
|
||||
```bash yarn
|
||||
yarn add unsend
|
||||
yarn add usesend
|
||||
```
|
||||
|
||||
```bash pnpm
|
||||
pnpm add unsend
|
||||
pnpm add usesend
|
||||
```
|
||||
|
||||
```bash bun
|
||||
bun add unsend
|
||||
bun add usesend
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
</Step>
|
||||
<Step title="Initialize SDK">
|
||||
Get the API key from the [Unsend dashboard](https://app.unsend.dev/dev-settings/api-keys) and initialize the SDK
|
||||
Get the API key from the [useSend dashboard](https://app.usesend.com/dev-settings/api-keys) and initialize the SDK
|
||||
|
||||
```javascript
|
||||
import { Unsend } from "unsend";
|
||||
import { UseSend } from "usesend";
|
||||
|
||||
const unsend = new Unsend("us_12345");
|
||||
const usesend = new UseSend("us_12345");
|
||||
```
|
||||
|
||||
If you are running a self-hosted version of Unsend, pass the base URL as the
|
||||
If you are running a self-hosted version of useSend, pass the base URL as the
|
||||
second argument:
|
||||
|
||||
```javascript
|
||||
const unsend = new Unsend("us_12345", "https://my-unsend-instance.com");
|
||||
const usesend = new UseSend("us_12345", "https://app.usesend.com");
|
||||
```
|
||||
|
||||
</Step>
|
||||
<Step title="Send Email">
|
||||
```javascript
|
||||
unsend.emails.send({
|
||||
usesend.emails.send({
|
||||
to: "hello@acme.com",
|
||||
from: "hello@company.com",
|
||||
subject: "Unsend email",
|
||||
html: "<p>Unsend is the best open source product to send emails</p>",
|
||||
text: "Unsend is the best open source product to send emails",
|
||||
subject: "useSend email",
|
||||
html: "<p>useSend is the best open source product to send emails</p>",
|
||||
text: "useSend is the best open source product to send emails",
|
||||
});
|
||||
```
|
||||
</Step>
|
||||
@@ -66,12 +66,12 @@ icon: node-js
|
||||
|
||||
<Steps>
|
||||
<Step title="Get the contact book id">
|
||||
Get the contact book id from the [Unsend dashboard](https://app.unsend.dev/contacts/). Copy the contact book id
|
||||
Get the contact book id from the [useSend dashboard](https://app.usesend.com/contacts/). Copy the contact book id
|
||||
</Step>
|
||||
<Step title="Add contacts">
|
||||
|
||||
```javascript
|
||||
unsend.contacts
|
||||
usesend.contacts
|
||||
.create("clzeydgeygff", {
|
||||
email: "hey@koushik.dev",
|
||||
firstName: "Koushik",
|
||||
@@ -83,7 +83,7 @@ icon: node-js
|
||||
|
||||
<Step title="Update contact">
|
||||
```javascript
|
||||
unsend.contacts.update("clzeydgeygff", contactId, {
|
||||
usesend.contacts.update("clzeydgeygff", contactId, {
|
||||
firstName: "Koushik",
|
||||
lastName: "KM",
|
||||
});
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Self hosting Unsend
|
||||
description: "An end-to-end guide on how to self-host Unsend. An opensource sending infrastructure for developers."
|
||||
title: Self hosting useSend
|
||||
description: "An end-to-end guide on how to self-host useSend. An open-source sending infrastructure for developers."
|
||||
icon: server
|
||||
---
|
||||
|
||||
@@ -13,7 +13,7 @@ If you have any questions join [#self-host](https://discord.gg/gbsvjb9MqV) on di
|
||||
|
||||
## Step 1: Environment variables
|
||||
|
||||
Unsend depends on AWS ses to send emails and SNS to receive email status. Along with that it also depends on Postgres as a database and Redis for queue. Copy the `.env.selfhost.example` file to `.env` and fill in the values.
|
||||
useSend depends on AWS SES to send emails and SNS to receive email status. Along with that it also depends on Postgres as a database and Redis for queue. Copy the `.env.selfhost.example` file to `.env` and fill in the values.
|
||||
|
||||
<Steps>
|
||||
<Step title="AWS credentials">
|
||||
@@ -33,11 +33,11 @@ Add the following environment variables.
|
||||
|
||||
</Step>
|
||||
<Step title="GitHub app credentials for login">
|
||||
Usend uses github authentication for login.
|
||||
useSend uses GitHub authentication for login.
|
||||
|
||||
Use this link to [create an github app](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps)
|
||||
|
||||
Callback URL : `https://<your-unsend-instance>/api/auth/callback/github`
|
||||
Callback URL : `https://<your-usesend-instance>/api/auth/callback/github`
|
||||
|
||||

|
||||
|
||||
@@ -48,10 +48,10 @@ GITHUB_ID="<your-github-client-id>"
|
||||
GITHUB_SECRET="<your-github-client-secret>"
|
||||
```
|
||||
|
||||
<Info>If you want email/password login, please help us out with the [code](https://github.com/unsend-dev/unsend) </Info>
|
||||
<Info>If you want email/password login, please help us out with the [code](https://github.com/usesend/usesend) </Info>
|
||||
</Step>
|
||||
<Step title="Database & Redis">
|
||||
Unsend uses Postgres as a database and Redis as a queue. You need to create a new database and add the following environment variables.
|
||||
useSend uses Postgres as a database and Redis as a queue. You need to create a new database and add the following environment variables.
|
||||
|
||||
If you're using docker-compose or our railway template, it's all automatically done for you.
|
||||
|
||||
@@ -71,8 +71,8 @@ openssl rand -base64 32
|
||||
Add the following environment variables.
|
||||
|
||||
```env
|
||||
NEXTAUTH_URL="https://<your-unsend-instance>"
|
||||
NEXTAUTH_SECRET="<your-unsend-secret>"
|
||||
NEXTAUTH_URL="https://<your-usesend-instance>"
|
||||
NEXTAUTH_SECRET="<your-usesend-secret>"
|
||||
```
|
||||
|
||||
</Step>
|
||||
@@ -86,7 +86,7 @@ You can use any platforms that supports docker. You can also use the railway tem
|
||||
|
||||
Follow this guide to setup your docker instance: [Set up docker](/get-started/set-up-docker)
|
||||
|
||||
[](https://hub.docker.com/r/unsend/unsend)
|
||||
[](https://hub.docker.com/r/usesend/usesend)
|
||||
|
||||
### Railway
|
||||
|
||||
@@ -96,15 +96,15 @@ Updating image is easy, click on the 3 dots and redeploy. This will pull the lat
|
||||
|
||||
[](https://railway.app/template/QbMnwX?referralCode=oaAwvp)
|
||||
|
||||
Your unsend instance is now live now.
|
||||
Your useSend instance is now live now.
|
||||
|
||||
## Step 3: Setting up a region
|
||||
|
||||
In order to send emails, you need to select an region in aws. Use a region where your users are located / where unsend is hosted. If you're confused just use `us-east-1`.
|
||||
In order to send emails, you need to select a region in AWS. Use a region where your users are located / where useSend is hosted. If you're confused just use `us-east-1`.
|
||||
|
||||
You can check available regions [here](https://docs.aws.amazon.com/general/latest/gr/ses.html)
|
||||
|
||||
Once you logged in to unsend, it will prompt you add ses configuration.
|
||||
Once you log in to useSend, it will prompt you add SES configuration.
|
||||
|
||||
- Add the region
|
||||
- Add the callback url, which is basically the app url. Note this should be accesible from internet. This is how you get the delivery status of the emails.
|
||||
@@ -120,10 +120,10 @@ Once you logged in to unsend, it will prompt you add ses configuration.
|
||||
|
||||
## Step 5: SMTP Proxy Server (Optional)
|
||||
|
||||
The SMTP proxy server is an optional component that allows applications to send emails through Unsend using standard SMTP protocol instead of the REST API. This is useful for legacy applications, email clients, or any software that needs to send emails via SMTP.
|
||||
The SMTP proxy server is an optional component that allows applications to send emails through useSend using standard SMTP protocol instead of the REST API. This is useful for legacy applications, email clients, or any software that needs to send emails via SMTP.
|
||||
|
||||
<Tip>
|
||||
The complete source code for the SMTP proxy server is available at: [unsend-dev/unsend/tree/main/apps/smtp-server](https://github.com/unsend-dev/unsend/tree/main/apps/smtp-server)
|
||||
The complete source code for the SMTP proxy server is available at: [usesend/usesend/tree/main/apps/smtp-server](https://github.com/usesend/usesend/tree/main/apps/smtp-server)
|
||||
</Tip>
|
||||
|
||||
### When to use the SMTP proxy:
|
||||
@@ -137,19 +137,19 @@ The complete source code for the SMTP proxy server is available at: [unsend-dev/
|
||||
Create a `docker-compose.yml` file for the SMTP server:
|
||||
|
||||
```yaml
|
||||
name: unsend-smtp-server
|
||||
name: usesend-smtp-server
|
||||
|
||||
services:
|
||||
smtp-server:
|
||||
container_name: unsend-smtp-server
|
||||
image: unsend/smtp-proxy:latest
|
||||
container_name: usesend-smtp-server
|
||||
image: usesend/smtp-proxy:latest
|
||||
environment:
|
||||
SMTP_AUTH_USERNAME: "unsend" # Username for SMTP authentication
|
||||
UNSEND_BASE_URL: "https://your-unsend-instance.com" # Your Unsend instance URL
|
||||
SMTP_AUTH_USERNAME: "usesend" # Username for SMTP authentication
|
||||
USESEND_BASE_URL: "https://your-usesend-instance.com" # Your useSend instance URL
|
||||
|
||||
# Optional: SSL certificate paths for secure connections
|
||||
# UNSEND_API_KEY_PATH: "/certs/server.key"
|
||||
# UNSEND_API_CERT_PATH: "/certs/server.crt"
|
||||
# USESEND_API_KEY_PATH: "/certs/server.key"
|
||||
# USESEND_API_CERT_PATH: "/certs/server.crt"
|
||||
|
||||
# Optional: Mount SSL certificates
|
||||
# volumes:
|
||||
@@ -178,12 +178,12 @@ To send emails through the proxy, configure your application with these SMTP set
|
||||
|
||||
- **Host**: Your server's IP address or domain
|
||||
- **Ports**: 25, 587 (STARTTLS), 465 (SSL/TLS), 2587, or 2465
|
||||
- **Username**: `unsend` (or your custom `SMTP_AUTH_USERNAME`)
|
||||
- **Password**: Your Unsend API key
|
||||
- **Username**: `usesend` (or your custom `SMTP_AUTH_USERNAME`)
|
||||
- **Password**: Your useSend API key
|
||||
- **Encryption**: STARTTLS (ports 25, 587, 2587) or SSL/TLS (ports 465, 2465)
|
||||
|
||||
<Tip>
|
||||
The SMTP proxy forwards all emails to your Unsend instance, so make sure your main Unsend application is running and accessible.
|
||||
The SMTP proxy forwards all emails to your useSend instance, so make sure your main useSend application is running and accessible.
|
||||
</Tip>
|
||||
|
||||
<Warning>
|
||||
@@ -201,5 +201,5 @@ You're all set up now.
|
||||
If you have any questions, please join [#self-host](https://discord.gg/gbsvjb9MqV) on discord.
|
||||
|
||||
<Tip>
|
||||
A community member shared a short write-up on hosting Unsend with [Coolify](https://mattstein.com/thoughts/coolify-unsend/). Give it a read if you need another reference.
|
||||
A community member shared a short write-up on hosting useSend with [Coolify](https://mattstein.com/thoughts/coolify-unsend/). Give it a read if you need another reference.
|
||||
</Tip>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Docker setup for unsend
|
||||
description: The following guide will walk you through setting up Unsend using Docker. You can choose between a production setup using Docker Compose or a standalone container.
|
||||
title: Docker setup for useSend
|
||||
description: The following guide will walk you through setting up useSend using Docker. You can choose between a production setup using Docker Compose or a standalone container.
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
@@ -12,9 +12,9 @@ Before you begin, ensure that you have the following installed:
|
||||
|
||||
## Option 1: Production Docker Compose Setup
|
||||
|
||||
This setup includes PostgreSQL, Redis and the Unsend application.
|
||||
This setup includes PostgreSQL, Redis and the useSend application.
|
||||
|
||||
1. Download the Docker Compose file from the Unsend repository: [compose.yml](https://github.com/unsend-dev/unsend/blob/main/docker/prod/compose.yml)
|
||||
1. Download the Docker Compose file from the useSend repository: [compose.yml](https://github.com/usesend/usesend/blob/main/docker/prod/compose.yml)
|
||||
2. Navigate to the directory containing the `compose.yml` file.
|
||||
3. Create a `.env` file in the same directory. Copy the contents of `.env.selfhost.example`
|
||||
4. Run the following command to start the containers:
|
||||
@@ -23,24 +23,24 @@ This setup includes PostgreSQL, Redis and the Unsend application.
|
||||
docker-compose --env-file ./.env up -d
|
||||
```
|
||||
|
||||
This will start the PostgreSQL database, Redis and the Unsend application containers.
|
||||
This will start the PostgreSQL database, Redis and the useSend application containers.
|
||||
|
||||
5. Access the Unsend application by visiting `http://localhost:3000` in your web browser.
|
||||
5. Access the useSend application by visiting `http://localhost:3000` in your web browser.
|
||||
|
||||
## Option 2: Standalone Docker Container
|
||||
|
||||
If you prefer to host the Unsend application on your container provider of choice, you can use the pre-built Docker image from DockerHub or GitHub's Package Registry. Note that you will need to provide your own database and SMTP host.
|
||||
If you prefer to host the useSend application on your container provider of choice, you can use the pre-built Docker image from DockerHub or GitHub's Package Registry. Note that you will need to provide your own database and SMTP host.
|
||||
|
||||
1. Pull the Unsend Docker image:
|
||||
1. Pull the useSend Docker image:
|
||||
|
||||
```
|
||||
docker pull unsend/unsend
|
||||
docker pull usesend/usesend
|
||||
```
|
||||
|
||||
Or, if using GitHub's Package Registry:
|
||||
|
||||
```
|
||||
docker pull ghcr.io/unsend-dev/unsend
|
||||
docker pull ghcr.io/usesend/usesend
|
||||
```
|
||||
|
||||
2. Run the Docker container, providing the necessary environment variables for your database and SMTP host:
|
||||
@@ -57,13 +57,13 @@ docker run -d \
|
||||
-e AWS_DEFAULT_REGION="<your-next-private-aws-region>"
|
||||
-e GITHUB_ID="<your-next-private-github-id>"
|
||||
-e GITHUB_SECRET="<your-next-private-github-secret>"
|
||||
unsend/unsend
|
||||
usesend/usesend
|
||||
```
|
||||
|
||||
Replace the placeholders with your actual database and aws details.
|
||||
|
||||
1. Access the Unsend application by visiting the URL you provided in the `NEXTAUTH_URL` environment variable in your web browser.
|
||||
1. Access the useSend application by visiting the URL you provided in the `NEXTAUTH_URL` environment variable in your web browser.
|
||||
|
||||
## Success
|
||||
|
||||
You have now successfully set up Unsend using Docker. You can start sending emails efficiently. If you encounter any issues or have further questions, please refer to the official Unsend documentation or seek assistance from the community.
|
||||
You have now successfully set up useSend using Docker. You can start sending emails efficiently. If you encounter any issues or have further questions, please refer to the official useSend documentation or seek assistance from the community.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: SMTP support
|
||||
description: "A guide to integrate Unsend with SMTP"
|
||||
description: "A guide to integrate useSend with SMTP"
|
||||
icon: envelope
|
||||
---
|
||||
|
||||
@@ -8,31 +8,31 @@ icon: envelope
|
||||
|
||||
You will need an API key and a verified domain to get the most out of this guide:
|
||||
|
||||
- [API Key](https://app.unsend.dev/dev-settings/api-keys)
|
||||
- [Verified Domain](https://app.unsend.dev/domains)
|
||||
- [API Key](https://app.usesend.com/dev-settings/api-keys)
|
||||
- [Verified Domain](https://app.usesend.com/domains)
|
||||
|
||||
## SMTP credentials
|
||||
|
||||
To set up your SMTP integration, you'll need to provide the following credentials:
|
||||
|
||||
- **Host:** ```smtp.unsend.dev```
|
||||
- **Host:** ```smtp.usesend.com```
|
||||
- **Port:** ```465```, ```587```, ```2465```, or ```2587```
|
||||
- **Username:** ```unsend```
|
||||
- **Username:** ```usesend```
|
||||
- **Password:** ```YOUR-API-KEY```
|
||||
|
||||
## Example with Nodemailer
|
||||
|
||||
Following example with Nodemailer shows how you can send mails with SMTP support from Unsend and Nodemailer.
|
||||
Following example with Nodemailer shows how you can send mails with SMTP support from useSend and Nodemailer.
|
||||
|
||||
```javascript
|
||||
const nodemailer = require("nodemailer");
|
||||
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: "smtp.unsend.dev",
|
||||
host: "smtp.usesend.com",
|
||||
port: 465,
|
||||
secure: false,
|
||||
auth: {
|
||||
user: "unsend",
|
||||
user: "usesend",
|
||||
pass: "us_123",
|
||||
},
|
||||
tls: {
|
||||
@@ -44,8 +44,8 @@ const mailOptions = {
|
||||
to: "sender@example.com",
|
||||
from: "hello@example.com",
|
||||
subject: "Testing SMTP",
|
||||
html: "<strong>THIS IS USING SMTP,</strong><p>Unsend is the best open source sending platform<p><p>check out <a href='https://unsend.dev'>unsend.dev</a>",
|
||||
text: "hello,\n\nUnsend is the best open source sending platform",
|
||||
html: "<strong>THIS IS USING SMTP,</strong><p>useSend is the best open source sending platform<p><p>check out <a href='https://usesend.com'>usesend.com</a>",
|
||||
text: "hello,\n\nuseSend is the best open source sending platform",
|
||||
};
|
||||
|
||||
transporter.sendMail(mailOptions, (error, info) => {
|
||||
@@ -55,4 +55,4 @@ transporter.sendMail(mailOptions, (error, info) => {
|
||||
console.log("Email sent successfully:", info.response);
|
||||
}
|
||||
});
|
||||
```
|
||||
```
|
||||
|
@@ -1,29 +1,29 @@
|
||||
---
|
||||
title: Use with React Email
|
||||
description: "A guide on how to use Unsend with React Email"
|
||||
description: "A guide on how to use useSend with React Email"
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
[React Email](https://react.email/docs/introduction) is a library for building emails with React. In this guide, we will show you how to use Unsend with React Email.
|
||||
[React Email](https://react.email/docs/introduction) is a library for building emails with React. In this guide, we will show you how to use useSend with React Email.
|
||||
|
||||
## Install dependencies
|
||||
|
||||
<CodeGroup>
|
||||
```sh npm
|
||||
npm install unsend @react-email/render
|
||||
npm install usesend @react-email/render
|
||||
```
|
||||
|
||||
```sh yarn
|
||||
yarn add unsend @react-email/render
|
||||
yarn add usesend @react-email/render
|
||||
```
|
||||
|
||||
```sh pnpm
|
||||
pnpm add unsend @react-email/render
|
||||
pnpm add usesend @react-email/render
|
||||
```
|
||||
|
||||
```sh bun
|
||||
bun add unsend @react-email/render
|
||||
bun add usesend @react-email/render
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
@@ -46,21 +46,21 @@ export function Email(props) {
|
||||
}
|
||||
```
|
||||
|
||||
## Send an email using Unsend
|
||||
## Send an email using useSend
|
||||
|
||||
```ts
|
||||
import { Unsend } from "unsend";
|
||||
import { UseSend } from "usesend";
|
||||
import { render } from "@react-email/render";
|
||||
import { Email } from "./email";
|
||||
|
||||
const unsend = new Unsend("us_your_unsend_api_key");
|
||||
const usesend = new UseSend("us_your_usesend_api_key");
|
||||
|
||||
const html = await render(<Email url="https://unsend.dev" />);
|
||||
const html = await render(<Email url="https://usesend.com" />);
|
||||
|
||||
const response = await unsend.emails.send({
|
||||
to: "hello@unsend.dev",
|
||||
from: "hello@unsend.dev",
|
||||
subject: "Unsend email",
|
||||
const response = await usesend.emails.send({
|
||||
to: "hello@usesend.com",
|
||||
from: "hello@usesend.com",
|
||||
subject: "useSend email",
|
||||
html,
|
||||
});
|
||||
```
|
||||
@@ -77,7 +77,7 @@ If you're using nodejs, importing `email.jsx` might fail. make sure to add these
|
||||
}
|
||||
```
|
||||
|
||||
Checkout this [example](https://github.com/unsend-dev/unsend-js-examples/tree/main/react-email-js)
|
||||
Checkout this [example](https://github.com/usesend/unsend-js-examples/tree/main/react-email-js)
|
||||
|
||||
### TypeScript
|
||||
|
||||
@@ -89,4 +89,4 @@ Just add `jsx` to your `tsconfig.json`
|
||||
}
|
||||
```
|
||||
|
||||
Checkout this [example](https://github.com/unsend-dev/unsend-js-examples/tree/main/react-email-ts)
|
||||
Checkout this [example](https://github.com/usesend/unsend-js-examples/tree/main/react-email-ts)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Introduction
|
||||
description: "Unsend is Open source alternative to Resend, Sendgrid, Mailgun and Postmark etc."
|
||||
description: "useSend is open source alternative to Resend, Sendgrid, Mailgun and Postmark etc."
|
||||
icon: rocket
|
||||
---
|
||||
|
||||
@@ -12,7 +12,7 @@ Quicklinks to set up your account and get started
|
||||
<Card
|
||||
title="Add domain"
|
||||
icon="globe"
|
||||
href="https://app.unsend.dev/domains"
|
||||
href="https://app.usesend.com/domains"
|
||||
>
|
||||
Add domains to send emails
|
||||
</Card>
|
||||
@@ -20,7 +20,7 @@ Quicklinks to set up your account and get started
|
||||
<Card
|
||||
title="Create API key"
|
||||
icon="key"
|
||||
href="https://app.unsend.dev/dev-settings/api-keys"
|
||||
href="https://app.usesend.com/dev-settings/api-keys"
|
||||
>
|
||||
Generate API key to send emails from your app.
|
||||
</Card>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://mintlify.com/schema.json",
|
||||
"name": "Unsend",
|
||||
"name": "useSend",
|
||||
"logo": {
|
||||
"dark": "/logo/Logo-wordmark-dark.png",
|
||||
"light": "/logo/Logo-wordmark.png"
|
||||
@@ -18,12 +18,12 @@
|
||||
"topbarLinks": [
|
||||
{
|
||||
"name": "Support",
|
||||
"url": "mailto:hello@unsend.dev"
|
||||
"url": "mailto:hey@usesend.com"
|
||||
}
|
||||
],
|
||||
"topbarCtaButton": {
|
||||
"name": "Dashboard",
|
||||
"url": "https://app.unsend.dev"
|
||||
"url": "https://app.usesend.com"
|
||||
},
|
||||
"tabs": [
|
||||
{
|
||||
@@ -35,7 +35,7 @@
|
||||
{
|
||||
"name": "GitHub",
|
||||
"icon": "github",
|
||||
"url": "https://github.com/unsend-dev/unsend"
|
||||
"url": "https://github.com/usesend/usesend"
|
||||
},
|
||||
{
|
||||
"name": "Community",
|
||||
|
Reference in New Issue
Block a user