Uniform + Kirby3: How to attach File to Email?


I am a building a contactform using the uniform Plugin. Works fine, but I am having trouble with the possibility to attach uploaded file(s). Solutions I find work with K2 (https://forum.getkirby.com/search?q=uniform%20attachment) esp. adding the attachment via PHP Mailer Service Options (Uniform + phpmailer with file attachment).

I just don’t know how to get there with uniform + K3. Any tipp how to solve this in the controller?

Now I have this one in the controller like written in the docs:

            'to' => 'post@mariokeipert.de',
            'from' => 'test@psi-sprachen.com',
            // Dynamically generate the subject with a template.
            'subject' => 'New registration for a {booth} booth'
        ->uploadAction(['fields' => [
          'filefield' => [
              'target' => '/uploads/',
              'prefix' => false,

I assume, the uploadAction is not necessary?

Thanks for help!

I don’t think so, but there is an attachmentoption for the email action.

thank you. Yes, I have found the attachments-option and tried it out. But I get stuck by adding the uploaded file as attachment. tried move_uploaded_file before firing the email-action, uploading + moving the file work fine - but the email isn’t send…