---
title: "ईमेल भेजें"
description: "Brevo API के ज़रिए ट्रांज़ैक्शनल ईमेल भेजें"
url: https://tajo.io/hi/docs/email-messaging/transactional-email/send-email/
markdown: https://tajo.io/hi/docs/email-messaging/transactional-email/send-email.md
lang: hi-IN
robots: noindex
---

अर्ली एक्सेस का अनुरोध करें

अपना पहला नाम और कार्यस्थल का ईमेल पता दर्ज करें। Tajo एक्सेस अनुरोध की पुष्टि के लिए हम आपको एक लिंक ईमेल करेंगे।

# ईमेल भेजें

`/v3/smtp/email` एंडपॉइंट का उपयोग करके अलग-अलग ट्रांज़ैक्शनल ईमेल भेजें.

## एंडपॉइंट

```http
POST /v3/smtp/email
```

## रिक्वेस्ट बॉडी

### बुनियादी ईमेल

```json
{
  "sender": {
    "name": "Your App",
    "email": "noreply@yourapp.com"
  },
  "to": [
    {
      "email": "user@example.com",
      "name": "John Doe"
    }
  ],
  "subject": "Welcome to our service!",
  "htmlContent": "<html><body><h1>Welcome!</h1><p>Thank you for signing up.</p></body></html>"
}
```

### उन्नत ईमेल

```json
{
  "sender": {
    "name": "Your App",
    "email": "noreply@yourapp.com"
  },
  "to": [
    {
      "email": "user@example.com",
      "name": "John Doe"
    }
  ],
  "cc": [
    {
      "email": "cc@example.com",
      "name": "CC User"
    }
  ],
  "bcc": [
    {
      "email": "bcc@example.com"
    }
  ],
  "subject": "Order Confirmation #{{order_id}}",
  "htmlContent": "<html><body><h1>Order Confirmed</h1><p>Your order {{order_id}} has been confirmed.</p></body></html>",
  "textContent": "Your order {{order_id}} has been confirmed.",
  "params": {
    "order_id": "12345"
  },
  "tags": ["transactional", "order-confirmation"],
  "headers": {
    "X-Custom-Header": "custom-value"
  }
}
```

## कोड उदाहरण

### JavaScript/Node.js

```javascript
const brevo = require('@getbrevo/brevo');

const apiInstance = new brevo.TransactionalEmailsApi();
apiInstance.setApiKey(brevo.TransactionalEmailsApiApiKeys.apiKey, process.env.BREVO_API_KEY);

const sendEmail = async () => {
  const sendSmtpEmail = new brevo.SendSmtpEmail();

  sendSmtpEmail.subject = "Welcome to our service!";
  sendSmtpEmail.htmlContent = "<html><body><h1>Welcome!</h1></body></html>";
  sendSmtpEmail.sender = { name: "Your App", email: "noreply@yourapp.com" };
  sendSmtpEmail.to = [{ email: "user@example.com", name: "John Doe" }];

  try {
    const result = await apiInstance.sendTransacEmail(sendSmtpEmail);
    console.log('Email sent:', result);
    return result;
  } catch (error) {
    console.error('Error sending email:', error);
    throw error;
  }
};
```

### Python

```python
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException

configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'

api_instance = sib_api_v3_sdk.TransactionalEmailsApi(sib_api_v3_sdk.ApiClient(configuration))

send_smtp_email = sib_api_v3_sdk.SendSmtpEmail(
    to=[{"email": "user@example.com", "name": "John Doe"}],
    sender={"name": "Your App", "email": "noreply@yourapp.com"},
    subject="Welcome to our service!",
    html_content="<html><body><h1>Welcome!</h1></body></html>"
)

try:
    api_response = api_instance.send_transac_email(send_smtp_email)
    print(api_response)
except ApiException as e:
    print("Exception when calling TransactionalEmailsApi->send_transac_email: %s\n" % e)
```

### cURL

```bash
curl -X POST "https://api.brevo.com/v3/smtp/email" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_API_KEY" \
  -d '{
    "sender": {
      "name": "Your App",
      "email": "noreply@yourapp.com"
    },
    "to": [
      {
        "email": "user@example.com",
        "name": "John Doe"
      }
    ],
    "subject": "Welcome to our service!",
    "htmlContent": "<html><body><h1>Welcome!</h1></body></html>"
  }'
```

## रिस्पॉन्स

### सफल रिस्पॉन्स (201 Created)

```json
{
  "messageId": "<202301151234.12345@smtp-relay.mailin.fr>"
}
```

### एरर रिस्पॉन्स

**अमान्य API Key (401)**

```json
{
  "code": "unauthorized",
  "message": "Invalid API key provided"
}
```

**अमान्य ईमेल फ़ॉर्मैट (400)**

```json
{
  "code": "invalid_parameter",
  "message": "Invalid email format in 'to' field"
}
```

**रेट लिमिट पार हो गई (429)**

```json
{
  "code": "too_many_requests",
  "message": "Rate limit exceeded"
}
```

## पैरामीटर

### ज़रूरी पैरामीटर

| पैरामीटर | टाइप | विवरण |
| --- | --- | --- |
| `sender` | object | भेजने वाले की जानकारी |
| `to` | array | प्राप्तकर्ता ऑब्जेक्ट का ऐरे |
| `subject` | string | ईमेल की सब्जेक्ट लाइन |

### वैकल्पिक पैरामीटर

| पैरामीटर | टाइप | विवरण |
| --- | --- | --- |
| `htmlContent` | string | ईमेल का HTML कंटेंट |
| `textContent` | string | ईमेल का टेक्स्ट कंटेंट |
| `cc` | array | CC प्राप्तकर्ता |
| `bcc` | array | BCC प्राप्तकर्ता |
| `replyTo` | object | जवाब पाने का पता |
| `attachments` | array | फ़ाइल अटैचमेंट |
| `params` | object | टेम्पलेट पैरामीटर |
| `tags` | array | ट्रैकिंग के लिए ईमेल टैग |
| `headers` | object | कस्टम हेडर |

## टेम्पलेट वेरिएबल

अपने सब्जेक्ट और कंटेंट में टेम्पलेट वेरिएबल इस्तेमाल करें:

```json
{
  "subject": "Welcome {{firstName}}!",
  "htmlContent": "<h1>Hello {{firstName}} {{lastName}}</h1>",
  "params": {
    "firstName": "John",
    "lastName": "Doe"
  }
}
```

## अटैचमेंट

फ़ाइल अटैचमेंट शामिल करें:

```json
{
  "attachments": [
    {
      "content": "base64_encoded_content",
      "name": "invoice.pdf"
    },
    {
      "url": "https://example.com/document.pdf",
      "name": "document.pdf"
    }
  ]
}
```

## बेहतरीन तरीके

1. बेहतर डिलीवरेबिलिटी के लिए **हमेशा HTML और टेक्स्ट दोनों कंटेंट शामिल करें**
2. कंटेंट को जोड़ने के बजाय **टेम्पलेट वेरिएबल इस्तेमाल करें**
3. स्पैम फ़िल्टर से बचने के लिए **भेजने वाले की सही जानकारी शामिल करें**
4. ट्रैकिंग और एनालिटिक्स के लिए **टैग जोड़ें**
5. भेजने से पहले **ईमेल पते सत्यापित करें**
6. रीट्राई लॉजिक के साथ **एरर को सलीके से हैंडल करें**

## रेट लिमिट

- **API रेट लिमिट**: जनरल टियर पर, जो हर प्लान को मिलता है, यह एंडपॉइंट प्रति सेकंड 1,000 और प्रति घंटा 3,600,000 अनुरोधों की अनुमति देता है. एडवांस्ड टियर (Professional और Enterprise) प्रति सेकंड 2,000 और एक्सटेंडेड टियर (Enterprise) 6,000 की अनुमति देता है.
- **भेजने की मात्रा**: आप कितने ईमेल भेज सकते हैं, यह आपके Brevo प्लान से तय होता है, जो रेट लिमिट से अलग है.

[रेट लिमिट](https://tajo.io/hi/docs/rate-limits/) और Brevo का [रेट लिमिट पेज](https://developers.brevo.com/docs/api-limits) देखें.

## ट्रैकिंग

इस एंडपॉइंट से भेजे गए ईमेल की ये चीज़ें अपने आप ट्रैक होती हैं:

- डिलीवरी की स्थिति
- ओपन रेट
- क्लिक ट्रैकिंग
- बाउंस हैंडलिंग

विस्तृत एनालिटिक्स अपने Brevo डैशबोर्ड में **Statistics** → **Transactional** के नीचे देखें.

## संबंधित एंडपॉइंट

- ईमेल टेम्पलेट
- अटैचमेंट
- [ईमेल आँकड़े](https://tajo.io/hi/docs/analytics-reporting/)
