<commit_before>---
layout: "mailgun"
page_title: "Mailgun: mailgun_domain"
sidebar_current: "docs-mailgun-resource-domain"
---

# mailgun\_domain

Provides a Mailgun App resource. This can be used to
create and manage applications on Mailgun.

## Example Usage

```
# Create a new mailgun domain
resource "mailgun_domain" "default" {
    name = "test.example.com"
    smtp_password = "<PASSWORD>"
}

# Create SMTP Credentials
resource "mailgun_domain" "default" {
    name = "test.example.com"
    spam_action = "disabled"
    smtp_password = "<PASSWORD>"
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Required) The domain to add to Mailgun
* `smtp_password` - (Required) Password for SMTP authentication
* `spam_action` - (Optional) `disabled` or `tag` Disable, no spam
    filtering will occur for inbound messages. Tag, messages
    will be tagged wtih a spam header.
* `wildcard` - (Optional) Boolean determines whether
    the domain will accept email for sub-domains.

## Attributes Reference

The following attributes are exported:

* `name` - The name of the domain.
* `smtp_login` - The login email for the SMTP server.
* `smtp_password` - The password to the SMTP server.
* `wildcard` - Whether or not the domain will accept email for sub-domains.
* `spam_action` - The spam filtering setting.
<commit_msg>providers/mailgun: clarify domain docs<commit_after>---
layout: "mailgun"
page_title: "Mailgun: mailgun_domain"
sidebar_current: "docs-mailgun-resource-domain"
---

# mailgun\_domain

Provides a Mailgun App resource. This can be used to
create and manage applications on Mailgun.

## Example Usage

```
# Create a new mailgun domain
resource "mailgun_domain" "default" {
    name = "test.example.com"
    spam_action = "disabled"
    smtp_password = "<PASSWORD>"
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Required) The domain to add to Mailgun
* `smtp_password` - (Required) Password for SMTP authentication
* `spam_action` - (Optional) `disabled` or `tag` Disable, no spam
    filtering will occur for inbound messages. Tag, messages
    will be tagged wtih a spam header.
* `wildcard` - (Optional) Boolean determines whether
    the domain will accept email for sub-domains.

## Attributes Reference

The following attributes are exported:

* `name` - The name of the domain.
* `smtp_login` - The login email for the SMTP server.
* `smtp_password` - The password to the SMTP server.
* `wildcard` - Whether or not the domain will accept email for sub-domains.
* `spam_action` - The spam filtering setting.

{'fraction_non_alphanumeric': 0.09965371296652559, 'fraction_numerical': 0.0, 'mean_word_length': 4.1080550098231825, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6077762', 'n_tokens_mistral': 812, 'n_tokens_neox': 772, 'n_words': 295}