1

I know it is possible to attach a file from the Marketing Cloud's enhanced FTP, but I am wondering if it is possible to attach a file from an external SFTP server. Reading the documentation for AttachFile it seems like it isn't possible, but as it is possible to configure external SFTP servers within Email Studio (Admin -> Data Management -> File Locations) and use them in File Transfer activities it seems pretty strange that they aren't usable via AMPScript.

So is there any AMPScript function that can be used for this purpose?

1 Answer 1

2

The FTP source option only works with the Import directory of your Enhanced FTP account, not with any other FTP account.

One solution would be that if your external FTP account was bound to a published web directory (that is, any files in the directory could be publicly available from an HTTP/HTTPS URL), then you could use the HTTP option in the AttachFile() function.

If security was a concern (that these files are accessible from a publicly available URL), then there are a couple of options:

1. Basic access authentication

Password protect access to the publicly available web directory and the containing files (this is a default feature in IIS and Apache) then use basic access authentication in conjunction with an HTTPS endpoint, for example:

https://username:[email protected]/file.pdf

Note that as the connection is over HTTPS, the username and password credentials are secure and can't be compromised in transit.

2. IP Address Restriction

Restrict access to the published web directory (again, a standard feature in most web servers) and only allow ExactTarget IP addresses. The IP addresses will vary depending on which stack you are on, but you can review the complete list here.

1
  • Thanks for your answer and the possible workarounds! It sure isn't what I hoped for, but at least I now know that there really is no such feature and a workaround needs to be used. Hopefully this feature will be added in the future.. Commented Oct 16, 2016 at 9:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .