Skip to content

be781884 b115 c5aa e00b e39f692f5d90

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

MailMessageAttachmentModel.Path Property

Additional header content

Gets or sets the path to the file name you want to attach.

Namespace: iTin.Export.Model
Assembly: iTin.Export.Core (in iTin.Export.Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public string Path { get; set; }

VB

Public Property Path As String
	Get
	Set

Property Value

Type: String
A String that contains the path to the file name you want to attach. Requires full file path.

Exceptions

 

Exception Condition
ArgumentNullException If value is null.
InvalidPathNameException If value is an invalid path.

Remarks

TEE Object Element Usage

<Attachment Path="string"/>

Compatibility table with native writers.

Comma-Separated Values
CsvWriter
Tab-Separated Values
TsvWriter
SQL Script
SqlScriptWriter
XML Spreadsheet 2003
Spreadsheet2003TabularWriter
X X X X
X

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="address@gmail.com" password="pwd" Host="smtp.gmail.com"/>
      </Credentials>
    </Server>
    <Messages>
      <Message Credential="one" Send="Yes">
        <From Address="emailaddress-one@gmail.com"/>
        <To Addresses="emailaddress-two@hotmail.com emailaddress-three@hotmail.com"/>
        <CC Addresses="emailaddress-four@hotmail.com emailaddress-five@hotmail.com"/>
        <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

MailMessageAttachmentModel Class
iTin.Export.Model Namespace

Clone this wiki locally