Attaching a file to an email

Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
6 posts Page 1 of 1

pianocomposer

Posts: 1
Joined: Fri Jul 08, 2016 11:08 am

Post by pianocomposer » Fri Jul 08, 2016 11:14 am
I need to know how to attach a file to an email rather than specifying a directory folder. I think maybe I have to do that in the output variables, but I have not found a link that tells me how to do this. However, the online chat person (Tim) said: "When creating a project, you can select a template "Database to CSV to Email" which can serve as an example."

and "For more files, use a file list variable in the "Input Files Variable" field of the Attachment subtask."

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Mon Aug 01, 2016 5:53 pm
To attach a file to an email, you need to utilize the "Attachment" sub-task when executing a "Send Email".

From the Project Outline, right click on the "SendEmail" task, then select "Attachment".
From the prompt, you can provide the name of the file to attach, or you can provide a variable that is the full path and name of the file to attach.

Files that have been pre-defined by a FileList variable can be attached as well.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

kgutierrez

Posts: 6
Joined: Fri Aug 28, 2015 11:42 am

Post by kgutierrez » Fri Nov 04, 2016 5:37 pm
Is it possible to attach the joblog for the current job to an email? I am wanting to send out an email should the job fail and would like to attach the log.

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Fri Nov 04, 2016 5:42 pm
Yes ...

Just right click on the "SendEmail" task and choose the "Add Attachment" to the email.

For the FileName, click on the ${var} tab. In the LEFT column, you should see a system variable called "system.job.log".

Just attach that as your file name and you can email the joblog with your email ... up to that point of the email.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

kgutierrez

Posts: 6
Joined: Fri Aug 28, 2015 11:42 am

Post by kgutierrez » Fri Nov 18, 2016 2:09 pm
I am just now getting back to this but it's not working to email the joblog. I have ${system.job.logsystem.job.log} for the attachment but I get an error "Variable not found: system.job.logsystem.job.log". Any tips on what I might be doing wrong?

kgutierrez

Posts: 6
Joined: Fri Aug 28, 2015 11:42 am

Post by kgutierrez » Fri Nov 18, 2016 2:21 pm
Nevermind! I was double clicking that value in the box so it was adding it twice. Goodness!
6 posts Page 1 of 1