Interface IEmailMessageBuilder
Interface for email message builder.
Namespace: Kephas.Mail.Services
Assembly: Kephas.Mail.dll
Syntax
public interface IEmailMessageBuilder
Properties
| Improve this Doc View SourceEmailMessage
Gets a message describing the email.
Declaration
IEmailMessage EmailMessage { get; }
Property Value
Type | Description |
---|---|
IEmailMessage | A message describing the email. |
Methods
| Improve this Doc View SourceAddAttachment(Stream, String)
Adds an attachment to the message.
Declaration
IEmailMessageBuilder AddAttachment(Stream content, string name)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | content | The attachment content. |
System.String | name | The attachment name. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
Bcc(String, String)
Sets the blind carbon copy recipient address.
Declaration
IEmailMessageBuilder Bcc(string address, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The address. |
System.String | displayName | Name to display. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
BodyHtml(String)
Sets the HTML body.
Declaration
IEmailMessageBuilder BodyHtml(string body)
Parameters
Type | Name | Description |
---|---|---|
System.String | body | The HTML body. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
BodyText(String)
Sets the HTML body.
Declaration
IEmailMessageBuilder BodyText(string body)
Parameters
Type | Name | Description |
---|---|---|
System.String | body | The HTML body. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
Cc(String, String)
Sets the carbon copy recipient address.
Declaration
IEmailMessageBuilder Cc(string address, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The address. |
System.String | displayName | Name to display. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
From(String, String)
Sets the address from which the mail is sent.
Declaration
IEmailMessageBuilder From(string address, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The address. |
System.String | displayName | Name to display. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
Sender(String, String)
Sets the sender address.
Declaration
IEmailMessageBuilder Sender(string address, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The address. |
System.String | displayName | Name to display. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
Subject(String)
Sets the subject.
Declaration
IEmailMessageBuilder Subject(string subject)
Parameters
Type | Name | Description |
---|---|---|
System.String | subject | The subject. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |
To(String, String)
Sets the recipient address.
Declaration
IEmailMessageBuilder To(string address, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The address. |
System.String | displayName | Name to display. |
Returns
Type | Description |
---|---|
IEmailMessageBuilder | This IEmailMessageBuilder. |