> For the complete documentation index, see [llms.txt](https://docs.treem.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.treem.io/treem-dao/email-system/bulk-email-sending.md).

# Bulk Email Sending

## Bulk Email Sending

Send emails to multiple recipients simultaneously using pre-configured templates and user groups.

### Overview

The bulk email sender allows administrators to:

* **Send to User Groups**: Target specific user segments
* **Use Email Templates**: Leverage pre-configured templates with variables
* **Custom Recipients**: Add individual email addresses
* **Progress Tracking**: Monitor sending progress in real-time
* **Batch Processing**: Automatic rate limiting to prevent spam issues

### Getting Started

#### Step 1: Access Bulk Sender

1. Navigate to **Admin Dashboard → Settings → Email System**
2. Click on the **Bulk Send** tab
3. The interface shows configuration options and preview panels

#### Step 2: Select Email Template

1. Choose from available active templates in the dropdown
2. Only active templates appear in the selection
3. Template preview will update automatically

#### Step 3: Configure Template Variables

If your selected template includes variables:

1. Fill in each variable field that appears
2. All recipients will receive the same variable values
3. Leave blank for variables that should remain as placeholders

#### Step 4: Choose Recipients

Select recipient groups and/or add custom emails:

**User Groups**: Predefined segments of your user base**Custom Emails**: Individual email addresses (one per line)

#### Step 5: Review and Send

1. Check the estimated recipient count
2. Preview the email content
3. Click **"Send to X Recipients"** to begin sending

### Recipient Groups

#### Available User Groups

**All Users**: Every registered user in the system

* Includes all user roles and statuses
* Use with caution for sensitive communications

**Staked Users**: Users who have tokens staked

* Excludes users with no active stakes
* Good for governance-related communications

**Administrators**: Users with admin privileges

* System administrators and moderators
* Use for internal communications

**Regular Members**: Non-admin users

* Excludes administrators from the list
* Good for member-focused announcements

#### Group Statistics

Each group shows:

* **Name**: Descriptive group identifier
* **Count**: Number of users in the group
* **Filter**: Criteria used to define the group

### Custom Email Lists

#### Adding Individual Emails

1. Use the **"Custom Email Addresses"** text area
2. Enter one email address per line
3. System validates email format automatically
4. Invalid emails are filtered out before sending

#### Format Requirements

```
user1@example.com
user2@company.org
admin@dao.com
```

**Valid Formats**:

* Standard email format: `name@domain.com`
* Plus addressing: `user+tag@domain.com`
* Subdomains: `user@sub.domain.com`

**Invalid Formats** (will be filtered):

* Missing @ symbol: `userexample.com`
* Multiple @ symbols: `user@@domain.com`
* Empty lines or whitespace-only lines

### Template Variables

#### Setting Global Variables

When sending bulk emails, all recipients receive:

* **Same variable values**: Set once, applied to all emails
* **Personalization limitations**: Cannot customize per recipient
* **Static content**: Variables become fixed text

#### Common Bulk Email Variables

| Variable        | Description          | Example Value                   |
| --------------- | -------------------- | ------------------------------- |
| `dao_name`      | Organization name    | Treem DAO                       |
| `announcement`  | Main message content | New proposal voting is open     |
| `deadline`      | Important dates      | March 15, 2024                  |
| `action_url`    | Call-to-action link  | <https://app.treemdao.com/vote> |
| `contact_email` | Support contact      | <support@treemdao.com>          |

#### Best Practices for Variables

1. **Use generic values**: Avoid user-specific information
2. **Test with previews**: Verify variable replacement works correctly
3. **Provide meaningful content**: Don't leave variables empty
4. **Document purposes**: Keep track of what each variable represents

### Sending Process

#### Batch Processing

The system sends emails in batches to prevent:

* **Rate limiting**: Avoiding SMTP provider limits
* **Spam classification**: Preventing bulk email penalties
* **System overload**: Managing server resources efficiently

**Default Settings**:

* Batch size: 10 emails per batch
* Delay between batches: 1 second
* Progress tracking: Real-time updates

#### Progress Monitoring

During sending:

1. **Progress bar**: Shows completion percentage
2. **Status updates**: Real-time sending status
3. **Batch tracking**: Number of batches completed
4. **Error handling**: Failed sends are logged

#### Error Handling

If errors occur during sending:

* **Partial success**: Some emails may be sent successfully
* **Error logging**: Failed attempts are recorded
* **Retry logic**: System may attempt to resend failed emails
* **Admin notification**: Significant errors trigger alerts

### Recipient Management

#### Duplicate Handling

The system automatically:

1. **Removes duplicates**: Same email address from multiple sources
2. **Preserves groups**: Maintains group membership information
3. **Combines lists**: Merges user groups and custom emails
4. **Final count**: Shows accurate recipient count

#### Email Validation

Before sending, the system:

1. **Format validation**: Checks email address syntax
2. **Domain validation**: Basic domain format checking
3. **Blacklist checking**: Removes known invalid domains
4. **User preferences**: Respects user email preferences

### Security and Compliance

#### User Consent

**Email Preferences**: The system respects user email preferences:

* Users who disabled marketing emails are excluded from promotional bulk sends
* Security notifications cannot be disabled
* Users can opt out of newsletters and governance notifications

**Unsubscribe Handling**:

* All bulk emails should include unsubscribe options
* Users can manage preferences in their profile
* System honors opt-out requests automatically

#### Spam Prevention

**Rate Limiting**:

* Automatic delays between batches
* Configurable sending speeds
* SMTP provider compliance

**Content Guidelines**:

* Avoid spam trigger words
* Include proper sender identification
* Provide clear unsubscribe options
* Use authenticated sending domains

### Analytics and Tracking

#### Bulk Send Metrics

After sending, track:

* **Total sent**: Number of emails successfully delivered
* **Delivery rate**: Percentage of successful deliveries
* **Bounce rate**: Failed delivery percentage
* **Error details**: Specific failure reasons

#### Integration with Email Analytics

Bulk sends appear in the main email analytics:

* **Recent Activity**: Shows bulk send campaigns
* **Template Usage**: Tracks which templates are used most
* **Performance Metrics**: Overall system health

### Use Cases

#### Governance Communications

**New Proposal Announcements**:

* Template: `new_proposal_notification`
* Recipients: Staked Users (voting eligible)
* Variables: `proposal_title`, `voting_deadline`, `proposal_url`

**Voting Reminders**:

* Template: `voting_reminder`
* Recipients: Staked Users who haven't voted
* Variables: `proposal_title`, `time_remaining`, `vote_url`

#### System Announcements

**Platform Updates**:

* Template: `system_update`
* Recipients: All Users
* Variables: `update_summary`, `changelog_url`, `maintenance_window`

**Security Notifications**:

* Template: `security_alert`
* Recipients: All Users
* Variables: `issue_description`, `action_required`, `support_url`

#### Marketing Communications

**Newsletter Distribution**:

* Template: `monthly_newsletter`
* Recipients: Users with newsletter enabled
* Variables: `month_name`, `highlights`, `newsletter_url`

**Event Announcements**:

* Template: `event_invitation`
* Recipients: Regular Members
* Variables: `event_name`, `event_date`, `registration_url`

### Best Practices

#### Planning Bulk Sends

1. **Define purpose**: Clear communication objectives
2. **Target audience**: Choose appropriate recipient groups
3. **Content review**: Proofread templates and variables
4. **Timing consideration**: Send at optimal times for your audience

#### Testing Strategy

1. **Template testing**: Preview templates before bulk sending
2. **Small test groups**: Send to administrators first
3. **Variable verification**: Ensure all variables are properly set
4. **Delivery testing**: Verify emails reach different email providers

#### Monitoring and Follow-up

1. **Track metrics**: Monitor delivery and engagement rates
2. **Handle bounces**: Address failed deliveries promptly
3. **User feedback**: Respond to user inquiries about bulk emails
4. **Adjust strategy**: Improve future campaigns based on results

### Troubleshooting

#### Common Issues

**No Recipients Selected**:

* Verify user groups are selected or custom emails are entered
* Check that selected groups contain users
* Ensure email addresses are properly formatted

**Template Variables Empty**:

* Fill in all required template variables
* Preview template to verify variable replacement
* Check template configuration for required variables

**Sending Failures**:

* Verify SMTP configuration is working
* Check email provider sending limits
* Review error messages in recent activity logs

**Low Delivery Rates**:

* Check sender reputation with email providers
* Verify domain authentication (SPF, DKIM)
* Review email content for spam indicators

This bulk email system provides powerful capabilities for reaching your DAO community while maintaining security, compliance, and deliverability best practices.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.treem.io/treem-dao/email-system/bulk-email-sending.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
