Email Attached file from FTP folder

Discussion in 'C-Bus Automation Controllers' started by sjfp, May 20, 2022.

  1. sjfp

    sjfp

    Joined:
    Oct 31, 2004
    Messages:
    136
    Likes Received:
    0
    Location:
    UK
    Would like to automate sending a file from the NAC FTP folder to an email recipient.
    I can get a normal with plain text to work, but unsure how to attach a given file like test.txt
    Has anyone any ideas on how to ??
     
    sjfp, May 20, 2022
    #1
    1. Advertisements

  2. sjfp

    Dasman

    Joined:
    May 5, 2011
    Messages:
    17
    Likes Received:
    1
    Location:
    Adelaide
    Hi sjfp,

    I rewrote the mail function, you can either load it into your script of choice, or replace the mail function in the common functions section.

    There are a couple of fields you need to fill in, but it should be fairly trivial. Change the details of the attachment as its currently set to a text file in the ftp directory
     

    Attached Files:

    Dasman, Jun 1, 2022
    #2
    1. Advertisements

  3. sjfp

    sjfp

    Joined:
    Oct 31, 2004
    Messages:
    136
    Likes Received:
    0
    Location:
    UK
    Many thanks, will have go over the weekend. shall let you know how it goes.
     
    sjfp, Jun 1, 2022
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.