Skip to content

46c2fd97 c21d 54e8 bb0a d5358f48ad05

Fernando Garcia edited this page May 8, 2018 · 1 revision

MailBehaviorModel Class

Additional header content

A Specialization of BaseBehaviorModel class.
Which Represents a email behavior.

Inheritance Hierarchy

System.Object
  iTin.Export.Model.BaseModel(BaseBehaviorModel)
    iTin.Export.Model.BaseBehaviorModel
      iTin.Export.Model.MailBehaviorModel
Namespace: iTin.Export.Model
Assembly: iTin.Export.Core (in iTin.Export.Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

[SerializableAttribute]
public class MailBehaviorModel : BaseBehaviorModel

VB

<SerializableAttribute>
Public Class MailBehaviorModel
	Inherits BaseBehaviorModel

The MailBehaviorModel type exposes the following members.

Constructors

 

Name Description
Public method MailBehaviorModel Initializes a new instance of the MailBehaviorModel class.
  Back to Top

Properties

 

Name Description
Public propertyCode example Async Gets or sets a value indicating whether to execute asynchronously the behavior.
Public propertyCode example CanExecute Gets or sets a value indicating whether executes behavior. (Inherited from BaseBehaviorModel.)
Public propertyStatic member Default Gets a reference to default behavior.
Public property IsDefault Gets a value indicating whether this instance is default. (Overrides BaseBehaviorModel.IsDefault.)
Public propertyCode example Messages Gets or sets collection of e-mail messages.
Public property Properties Gets or sets a reference to user-defined property list for this element. (Inherited from BaseModel(T).)
Public propertyCode example Server Gets or sets a reference to mail server configuration.
  Back to Top

Methods

 

Name Description
Public method Equals (Inherited from Object.)
Public method Execute(IWriter) Execute behavior. (Inherited from BaseBehaviorModel.)
Public method Execute(IWriter, ExportSettings) Execute behavior. (Inherited from BaseBehaviorModel.)
Protected method ExecuteBehavior Code for execute download behavior. (Overrides BaseBehaviorModel.ExecuteBehavior(IWriter, ExportSettings).)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Protected method GetStaticBindingValue Gets the static binding value by reflection. (Inherited from BaseModel(T).)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method SaveToFile(String) Saves to file. (Inherited from BaseModel(T).)
Public method SaveToFile(String, Exception) Serializes current BaseModel object into file (Inherited from BaseModel(T).)
Public method Serialize Serializes current BaseModel object into an Xml document. (Inherited from BaseModel(T).)
Public method SetOwner Sets a reference to the owner object that contains this instance. (Inherited from BaseBehaviorModel.)
Public method ToString Returns a string that represents the current object. (Inherited from BaseModel(T).)
  Back to Top

Remarks

Belongs to: Behaviors. For more information, please see BehaviorsModel.
ITEE Object Element Usage

<Mail .../>
  <Server/>
  <Messages/>
</Mail>

Attributes

Attribute Optional Description
CanExecute Yes Determines whether executes behavior. The default is Yes.
Async Yes Determines whether to execute asynchronously the behavior. The default is Yes.
Elements  
Element Description
Server Mail server configuration.
Messages Collection of e-mail messages. Each element represents an e-mail message.
  Compatibility table with native writers.
Comma-Separated Values
CsvWriter
Tab-Separated Values
TsvWriter
SQL Script
SqlScriptWriter
XML Spreadsheet 2003
Spreadsheet2003TabularWriter
X X X X
A X value indicates that the writer supports this element.

Examples

XML

<Behaviors>
  <Downdload LocalCopy="Yes"/>
  <TransformFile Execute="Yes" Indented="Yes" Save="Yes" Path="~\Output"/>
  <Mail Execute="Yes" Async="Yes" >
    <Server>
      <Credentials>
        <Credential SSL="Yes" Name="one" UserName="[email protected]" password="pwd" Host="smtp.gmail.com"/>
      </Credentials>
    </Server>
    <Messages>
      <Message Credential="one" Send="Yes">
        <From Address="[email protected]"/>
        <To Addresses="[email protected] [email protected]"/>
        <CC Addresses="[email protected] [email protected]"/>
        <Subject>New report</Subject>
        <Body>Hello, this is your report, sending from iTin.Export</Body>
        <Attachments>
          <Attachment Path="C:\Users\somefile.txt"/>
          <Attachment Path="C:\Users\Downloads\Photos Sample.zip"/>
        </Attachments>
      </Message>
    </Messages>
  </Mail>
</Behaviors>

See Also

Reference

iTin.Export.Model Namespace

Clone this wiki locally