AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
 
Represents the destination of the message, consisting of To:, CC:, and BCC: fields.

By default, the string must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047.

Inheritance Hierarchy

System.Object
  Amazon.SimpleEmail.Model.Destination

Namespace: Amazon.SimpleEmail.Model
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class Destination : Object

The Destination type exposes the following members

Constructors

NameDescription
Public Method Destination() Empty constructor used to set properties independently even when a simple constructor is available
Public Method Destination(List<String>)

Properties

NameTypeDescription
Public Property BccAddresses System.Collections.Generic.List<System.String> Gets and sets the property BccAddresses.

The BCC: field(s) of the message.

Public Property CcAddresses System.Collections.Generic.List<System.String> Gets and sets the property CcAddresses.

The CC: field(s) of the message.

Public Property ToAddresses System.Collections.Generic.List<System.String> Gets and sets the property ToAddresses.

The To: field(s) of the message.

Examples

This example shows how to send an email.

Send email example

var sesClient = new AmazonSimpleEmailServiceClient();           
      
var dest = new Destination
{
  ToAddresses = new List<string>() { "janedoe@example.com" },
  CcAddresses = new List<string>() { "richarddoe@example.com" }
};

var from = "johndoe@example.com";
var subject = new Content("You're invited to the meeting");
var body = new Body(new Content("Please join us Monday at 7:00 PM."));
var msg = new Message(subject, body);

var request = new SendEmailRequest
{
  Destination = dest,
  Message = msg, 
  Source = from
};

sesClient.SendEmail(request);
      

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8