As a last step in Automation, I want to send email and attach file from FTP.
How can we achieve this.
If you are attaching a file from the FTP to the email, you will want to explore the AMPScript function AttachFile()
A sample call of it would be:
Please note though that this needs to be enabled by SFMC and actually incurs a cost per attachment. You will need to talk to your rep to discuss cost - which I believe hinges on the volume you buy up front.
Outside of attachment, a less expensive route would be to import the file into Content Builder or host on a 3rd party public server and link the file inside the email.
<a href="http://example.com/catalog.pdf">Click here for your PDF</a>
I usually recommend the link route as it is much more cost effective and it also can help to improve deliverability (depending on volume and audience you are sending to) as many Email Clients view attachments coming from 'commercial' Email IPs as high risk and can either mark these as spam or block them altogether.
A final option is to find an SMTP service to supplement your SFMC account and then use a script activity at the end of your automation to send an API to the SMTP service to send out the email. Please note though that this will incur extra cost due to the fees for the other SMTP service, and it will also be outside of SFMC. Which means all tracking, etc. will not be available inside SFMC without further integration.
Available file types that can be attached via AttachFile():
- Microsoft Word documents (.doc, .docx)
- Microsoft Excel documents (.xls, .xlsx, .csv)
- Microsoft Powerpoint documents (.ppt, .pptx)
- PDF documents (.pdf)
- ZIP archive files (.zip)
- Compressed archive files (.rar)
- PNG images (.png)
- GIF images (.gif)
- JPEG images (.jpg, .jpeg)
- TIFF images (.tif, .tiff)
- Video files (.mp4)
- ICS file (.ics)
- vCard files (.vcf)