Show / Hide Table of Contents

Class MailFrom

Provides an SES domain MAIL FROM resource.

NOTE: For the MAIL FROM domain to be fully usable, this resource should be paired with the aws.ses.DomainIdentity resource. To validate the MAIL FROM domain, a DNS MX record is required. To pass SPF checks, a DNS TXT record may also be required. See the Amazon SES MAIL FROM documentation for more information.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    // Example SES Domain Identity
    var exampleDomainIdentity = new Aws.Ses.DomainIdentity("exampleDomainIdentity", new Aws.Ses.DomainIdentityArgs
    {
        Domain = "example.com",
    });
    var exampleMailFrom = new Aws.Ses.MailFrom("exampleMailFrom", new Aws.Ses.MailFromArgs
    {
        Domain = exampleDomainIdentity.Domain,
        MailFromDomain = exampleDomainIdentity.Domain.Apply(domain => $"bounce.{domain}"),
    });
    // Example Route53 MX record
    var exampleSesDomainMailFromMx = new Aws.Route53.Record("exampleSesDomainMailFromMx", new Aws.Route53.RecordArgs
    {
        Name = exampleMailFrom.MailFromDomain,
        Records = 
        {
            "10 feedback-smtp.us-east-1.amazonses.com",
        },
        Ttl = "600",
        Type = "MX",
        ZoneId = aws_route53_zone.Example.Id,
    });
    // Example Route53 TXT record for SPF
    var exampleSesDomainMailFromTxt = new Aws.Route53.Record("exampleSesDomainMailFromTxt", new Aws.Route53.RecordArgs
    {
        Name = exampleMailFrom.MailFromDomain,
        Records = 
        {
            "v=spf1 include:amazonses.com -all",
        },
        Ttl = "600",
        Type = "TXT",
        ZoneId = aws_route53_zone.Example.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
MailFrom
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ses
Assembly: Pulumi.Aws.dll
Syntax
public class MailFrom : CustomResource

Constructors

View Source

MailFrom(String, MailFromArgs, CustomResourceOptions)

Create a MailFrom resource with the given unique name, arguments, and options.

Declaration
public MailFrom(string name, MailFromArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

MailFromArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

BehaviorOnMxFailure

The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to UseDefaultValue. See the SES API documentation for more information.

Declaration
public Output<string> BehaviorOnMxFailure { get; }
Property Value
Type Description
Output<System.String>
View Source

Domain

Verified domain name to generate DKIM tokens for.

Declaration
public Output<string> Domain { get; }
Property Value
Type Description
Output<System.String>
View Source

MailFromDomain

Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)

Declaration
public Output<string> MailFromDomain { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, MailFromState, CustomResourceOptions)

Get an existing MailFrom resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static MailFrom Get(string name, Input<string> id, MailFromState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

MailFromState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
MailFrom
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.