chore: update README with new contributors and remove outdated Python documentation

This commit is contained in:
KM Koushik
2025-09-11 21:09:06 +10:00
parent 59fac64356
commit 66208a4b7a
3 changed files with 13 additions and 145 deletions

View File

@@ -121,3 +121,11 @@ We are grateful for the support of our sponsors.
<a href="https://doras.to/" target="_blank">
<img src="https://cdn.doras.to/doras/assets/05c5db48-cfba-49d7-82a1-5b4a3751aa40/49ca4647-65ed-412e-95c6-c475633d62af.png" alt="doras.to" style="width:60px;height:60px;">
</a>
<a href="https://github.com/anaclumos" target="_blank">
<img src="https://avatars.githubusercontent.com/u/31657298?v=4" alt="anaclumos" style="width:60px;height:60px;">
</a>
<a href="https://github.com/miguilimzero" target="_blank">
<img src="https://avatars.githubusercontent.com/u/35383529?v=4" alt="miguilimzero" style="width:60px;height:60px;">
</a>

View File

@@ -1,140 +0,0 @@
---
title: Python
description: "The Unsend Python package lets you interact with the Unsend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information."
icon: python
---
<Warning>
This is a community-maintained package and not maintained by the Unsend.
</Warning>
**Shout out to [harshsbhat](https://x.com/HarshBhatX) for maintaining this package.**
## Installation
To install the Unsend package, you can use pip:
```bash
pip install unsendcommunity
```
## Related Links
GitHub Repository: [GitHub](https://github.com/harshsbhat/unsend_community.git)
PyPI package: [PyPi](https://pypi.org/project/UnsendCommunity/)
## Usage
Below is an example of how to use the Unsend package to send an email and retrieve email information.
### Initialize
Change the URL accordingly if you are using self self-hosted version of Unsend. The default URL will be https://app.unsend.dev.
```python
from unsendcommunity import Unsend
# Initialize the Unsend client
api_key = 'your-api-key'
client = Unsend(key=api_key, url='https://app.unsend.dev')
```
### Sending Emails
To send an email you will need to define the payload. After definition, you can use the `.send_emails` method to send emails with the payload as a parameter.
```python
payload = {
"to": "youremail@gmail.com",
"from": "hello@domainname.com",
"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>",
}
# Send the email
response = client.send_email(payload)
print("Send Email Response:", response)
```
### Retrieve Emails using the id
The email will be retrieved using the ID you get after sending the mail.
```python
email_id = 'email-id-from-unsend'
email_response = client.get_email(email_id)
print("Get Email Response:", email_response)
```
The sample response of `get_email` is shown below:
```bash
{
"data": {
"id": "your-email-id",
"teamId": 1,
"to": [
"yourmail@example.com"
],
"from": "hello@mail.example.com",
"subject": "Unsend test email",
"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>",
"text": "hello,\n\nUnsend is the best open source sending platform",
"createdAt": "2024-07-29T05:04:21.498Z",
"updatedAt": "2024-07-29T05:04:27.130Z",
"emailEvents": [
{
"emailId": "your-email-id",
"status": "FAILED",
"createdAt": "2024-07-29T05:04:27.124Z",
"data": {
"error": "MessageRejected: Email address is not verified. The following identities failed the check in region US-EAST-1: example@gmail.com"
}
}
]
},
"error": null
}
```
### Retrieve domain information
Retrieves domain information
Domains that are associated with this account will be displayed with their detailed information.
```python
domain_response = client.get_domain()
print("Get Domain Response:", domain_response)
```
Sample response of the `get_domain` method
```bash
{
"data": [
{
"id": 1,
"name": "mail.domain.com",
"teamId": 1,
"status": "SUCCESS",
"region": "us-east-1",
"clickTracking": false,
"openTracking": false,
"publicKey": "your-public-key",
"dkimStatus": "SUCCESS",
"spfDetails": "SUCCESS",
"dmarcAdded": false,
"errorMessage": null,
"subdomain": "mail",
"isVerifying": false,
"createdAt": "2024-07-26T05:52:17.199Z",
"updatedAt": "2024-07-26T05:57:27.790Z"
}
],
"error": null
}
```

View File

@@ -11,19 +11,19 @@ description: "A guide on how to use useSend with React Email"
<CodeGroup>
```sh npm
npm install usesend @react-email/render
npm install usesend-js @react-email/render
```
```sh yarn
yarn add usesend @react-email/render
yarn add usesend-js @react-email/render
```
```sh pnpm
pnpm add usesend @react-email/render
pnpm add usesend-js @react-email/render
```
```sh bun
bun add usesend @react-email/render
bun add usesend-js @react-email/render
```
</CodeGroup>
@@ -49,7 +49,7 @@ export function Email(props) {
## Send an email using useSend
```ts
import { UseSend } from "usesend";
import { UseSend } from "usesend-js";
import { render } from "@react-email/render";
import { Email } from "./email";