Neos and Multipart/form-data

Hey guys,
I have integrated a form with enctype multipart/form-data and here is my form .yaml.
The form dont send any mail. But other forms on my site send mails.
Here is the form:
http://bit.ly/2iorIJf

The e-mail adresses are correct.

Can you help me?
Thx

type: 'Neos.Form:Form'
identifier: jobform
label: 'Onlinebewerbung'
renderingOptions:
  submitButtonLabel: 'Bewerbung senden'
renderables:
  -
    type: 'Neos.Form:Page'
    identifier: page-one
    label: 'Onlinebewerbung'
    renderables:
      -
        type: 'Neos.Form:SingleLineText'
        identifier: kundennummer
        label: 'Kundennummer (optional)'
        properties:
          placeholder: 'Kundennummer'
        defaultValue: ''
      -
        type: 'Neos.Form:SingleLineText'
        identifier: firstname
        label: 'Vorname'
        validators:
          - identifier: 'Neos.Flow:NotEmpty'
        properties:
          placeholder: 'Vorname'
        defaultValue: ''
      -
        type: 'Neos.Form:SingleLineText'
        identifier: lastname
        label: 'Nachname'
        validators:
          - identifier: 'Neos.Flow:NotEmpty'
        properties:
          placeholder: 'Nachname'
        defaultValue: ''
      -
        type: 'Neos.Form:SingleLineText'
        identifier: adresse
        label: 'Adresse'
        validators:
          - identifier: 'Neos.Flow:NotEmpty'
        properties:
          placeholder: 'Adresse'
        defaultValue: ''
      -
        type: 'Neos.Form:SingleLineText'
        identifier: plzort
        label: 'PLZ/Ort'
        validators:
          - identifier: 'Neos.Flow:NotEmpty'
        properties:
          placeholder: 'PLZ/Ort'
        defaultValue: ''
      -
        type: 'Neos.Form:SingleLineText'
        identifier: telefon
        label: 'Telefonnummer'
        validators:
          - identifier: 'Neos.Flow:NotEmpty'
        properties:
          placeholder: 'Telefonnummer'
        defaultValue: ''
      -
        type: 'Neos.Form:SingleLineText'
        identifier: email
        label: 'E-Mail Adresse'
        validators:
          - identifier: 'Neos.Flow:EmailAddress'
        properties:
          placeholder: 'E-Mail Adresse'
        defaultValue: ''
      -
        type: 'Neos.Form:StaticText'
        identifier: head
        properties:
          text: 'Ihre Unterlagen'
      -
        type: 'Neos.Form:FileUpload'
        identifier: datei1
        label: 'Schriftliche Bewerbung'
        properties:
          placeholder: 'Schriftliche Bewerbung'
          allowedExtensions: ['pdf', 'doc']
      -
        type: 'Neos.Form:FileUpload'
        identifier: datei2
        label: 'Lebenslauf'
        properties:
          placeholder: 'Lebenslauf'
          allowedExtensions: ['pdf', 'doc']
      -
        type: 'Neos.Form:FileUpload'
        identifier: datei3
        label: 'Zeugnisse'
        properties:
          placeholder: 'Zeugnisse'
          allowedExtensions: ['pdf', 'doc']
finishers:
# Uncomment the following lines and install the Neos/swiftmailer package to send mails
  -
    identifier: 'Neos.Form:Email'
    options:
      templatePathAndFilename: resource://Landmarkt.Site/Private/Templates/Form/JobForm/Email.txt
      subject: 'Onlinebewerbung'
      recipientAddress: 'mail@mail.com'
      recipientName: 'Landmarkt KG'
      senderAddress: 'mail@mail.com'
      senderName: 'Landmarkt KG'
      replyToAddress: 'mail@mail.com'
      format: plaintext
  -
    identifier: 'Neos.Form:Confirmation'
    options:
      message: '<p><strong>Vielen Dank für Ihr Interesse an einer Stelle bei der Landmarkt KG!</strong><br /> Wir kontaktieren Sie in Kürze.</p>'

Hi Patric,

Just to make clear: The email is not sent at all?
Did you check the error log?
What’s the content of `resource://Landmarkt.Site/Private/Templates/Form/JobForm/Email.txt``
?

And, lastly, if you want to send the uploaded files via email you need a custom Finisher, or FEATURE: EmailFinisher file attachments by bwaidelich · Pull Request #58 · neos/form · GitHub

Thank you for your answer Bastian.

The error log says: nothing.
The system log says: Successfully imported the uploaded file and FileSystemSymlinkTarget: Published file.
I think it is all okay.

I have added the finisher: attachAllPersistentResources: true

The Email.txt’s content:

Onlinebewerbung

<f:for each="{form.formState.formValues}" as="value" key="label">
    {label}: {value}
</f:for>

Do you have the latest dev-master of Form.Neos and the mentioned Pull-Request applied?

In the case of the upload fields, that would try to render the PersistentResources in your email template… I wonder why there is no entry in your logs, but I’m not surprised that this won’t work.

@patriceckhart can we mark this thread as resolved or do you still struggle with this?

@bwaidelich I’m currently not working on it, but the approach has helped me …

1 Like