Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author mkscripts

    (@mkscripts)

    Hi,

    It is not yet possible to add files to the email, besides embedded images and the download file (link). With the upcoming update we will add a filter to add attachments to the email.

    Kind regards,
    Team Download After Email

    Thread Starter wicouy

    (@wicouy)

    ok, i try use wp_mail but i did not succeed wen try create array.
    i wait for this update.
    Thanks

    Plugin Author mkscripts

    (@mkscripts)

    Since version 2.0.5 it’s possible to use a filter to add attachments to the email that is sent to the subscriber/user. Below an example to illustrate the use of this filter.

    add_filter( 'dae_email_attachments', 'my_dae_email_attachments' );
    function my_dae_email_attachments() {
    
        // Fill in your attachment ID's
        $attachment_ids = array( 8, 18 );
    
        foreach ( $attachment_ids as $attachment_id ) {
            
            if ( $filepath = get_attached_file( $attachment_id ) ) {
                $filepaths[] = $filepath;
            }
    
        }
    
        if ( empty( $filepaths ) ) {
            return array();
        }
    
        return $filepaths;
    
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘attached file’ is closed to new replies.