Framework EDI Reference. Methods and Properties
mailDocument. GetTransports

Gets the transport object of the subject message in the mail document.

Syntax:

Returns

If successful return an object of type FREDI.ediTransports, otherwise NULL or empty if the operation failed.

Remarks

The ediTransports object determines how the file is sent to the trading partner.  Current the only available methods are:

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oTransports As Fredi.ediTransports
Dim oDestination As Fredi.ediTransport

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

' Load EDI document normally.
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get the mail document's transports object.
Set oTransports = oMailDocument.GetTransports

' Create a single transport destination and set parameters
' to send document using HTTP.
Set oDestination = oTransports.CreateTransport
oDestination.SetHTTP
oDestination.User = "anonymous"
oDestination.Password = "somepassword"
oDestination.Address = "www.website.com"
oDestination.TargetPath = "/files/"

oDestination.Send

MsgBox "Done"

Samples