---
title: "이메일 발송 | Tajo"
description: "Brevo API로 트랜잭션 이메일을 발송합니다"
url: https://tajo.io/kr/docs/email-messaging/transactional-email/send-email/
markdown: https://tajo.io/kr/docs/email-messaging/transactional-email/send-email.md
lang: ko-KR
author: "Set Noa"
author_url: https://tajo.io/kr/set-noa/
robots: noindex
---

Tajo 사전 이용 신청

이름과 회사 이메일 주소를 입력하세요. Tajo 이용 신청을 확인할 수 있는 링크를 이메일로 보내드립니다.

# 이메일 발송

[Set Noa](https://tajo.io/kr/set-noa/)

`/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 키 (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 | 참조 수신자 |
| `bcc` | array | 숨은 참조 수신자 |
| `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회를 허용합니다. Advanced 등급(Professional 및 Enterprise)은 초당 2,000회, Extended 등급(Enterprise)은 초당 6,000회를 허용합니다.
- **발송량**: 보낼 수 있는 이메일 수는 요금제 한도와는 별개로 Brevo 요금제에 따라 정해집니다.

[요청 한도](https://tajo.io/kr/docs/rate-limits/)와 Brevo의 [요청 한도 페이지](https://developers.brevo.com/docs/api-limits)를 참조하세요.

## 추적

이 엔드포인트로 발송한 이메일은 다음 항목이 자동으로 추적됩니다.

- 전달 상태
- 열람률
- 클릭 추적
- 반송 처리

자세한 분석은 Brevo 대시보드의 **통계** → **트랜잭션**에서 확인하십시오.

## 관련 엔드포인트

- 이메일 템플릿
- 첨부 파일
- [이메일 통계](https://tajo.io/kr/docs/analytics-reporting/)
