I am using this code to attach a file from FTP, but it is not working.


var @fileName, @fileAlias
set @fileName = "LoyaltyMembers.zip"
set @fileAlias = "LoyaltyMembers_FTP.zip"

AttachFile("FTP", @fileName, @fileAlias)


I am not getting an error either, but the mail is not being sent. Although when I am trying to send an attachment through HTTP, it's working fine.

I have also used this code, yet getting the same issue, the email is not being sent.


Can anyone please help?

  • 1
    Are you and Nabanita working on the same task? Please refrain from posting questions when a similar one, posted earlier on the same day, is pending an answer. Apr 9, 2021 at 10:47
  • Ahahahaa. Didnt Notice this ;) :D Great Comment ;) Apr 9, 2021 at 10:56
  • I believe that the string where you search for the file could be bad, maybe you didnt include the folder structure or the fullname of the file. another thing, maybe your concat is wrong which leads to a wrong filename Apr 9, 2021 at 11:53

1 Answer 1


AttachFile is an option that comes with a cost. You need to contact your account executive to get this enabled.

Also each time you will send with a FILE it will consume an attachmessage count. And you will have to decide how many attachmessages you will license.

  • AttachFile() function is enabled. It's working fine for HTTP. But facing the issue for FTP Apr 9, 2021 at 11:49

You must log in to answer this question.

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