> For the complete documentation index, see [llms.txt](https://docs.stylemixthemes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stylemixthemes.com/masterstudy-lms/developers-guide/masterstudy-lms-hooks/email-manager.md).

# Email Manager

The [**Email Manager**](/masterstudy-lms/lms-pro-addons/email-manager.md) addon provides filters that let you customize email templates and adjust the available settings within the email manager interface. Use these hooks to modify default subjects, add new configuration fields, or override existing ones.

## Filters

1. `stm_lms_email_manager_emails`

**Type:** filter\
**What it does:** lets you change the default email templates and their values (for example, subject lines or message bodies)\
**Parameters:**

* `$emails` (array) list of email templates and their data

**Return:** array of updated emails

**Example:**

```php
add_filter( 'stm_lms_email_manager_emails', 'stm_lms_email_manager_emails_function',  10, 1 );

function stm_lms_email_manager_emails_function($emails){
    if ( ! empty( $emails['stm_lms_course_added'] ) ) {
        $emails['stm_lms_course_added']['subject'] = 'New course added';
    }

    return $emails;
}
```

2. `stm_lms_email_manager_settings`

**Type:** filter\
**What it does:** allows you to extend or modify the settings available in the Email Manager settings menu\
**Parameters:**

* `$data` (array) existing settings data

**Return:** array of updated settings

**Example:**

```php
dd_filter( 'stm_lms_email_manager_settings', 'stm_lms_email_manager_settings_function', 10, 1 );
	function stm_lms_email_manager_settings_function($data) {
		
$email_branding = array(
   'upcoming-course-status' => array(
      'name'   => 'Upcoming',
      'fields' => array(
         'masterstudy_lms_coming_soon_pre_sale_hidden'   => array(
            'type'  => 'send_email',
            'group' => 'ended',
            'label' => esc_html__( 'Hidden', 'masterstudy-lms-learning-management-system-pro' ),
            'value' => 'masterstudy_lms_coming_soon_pre_sale',
         ),
         'masterstudy_lms_coming_soon_start_date_hidden'   => array(
            'type'  => 'send_email',
            'group' => 'ended',
            'label' => esc_html__( 'Hidden', 'masterstudy-lms-learning-management-system-pro' ),
            'value' => 'masterstudy_lms_coming_soon_start_date',
         ),
      ),
   ),
);


return array_merge( $settings, $email_branding );
}
```


---

# 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.stylemixthemes.com/masterstudy-lms/developers-guide/masterstudy-lms-hooks/email-manager.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.
