1

I'm using Sitecore Forms Extension to build forms, Sitecore version 10.1. I created a form and added a "File Upload" element, and created an automated email campaign.

I'm having a problem that the attached file in the form is not attached to the sent mail, I only get the File Id and File name in the email.

enter image description here

According to this link I should be able to add a configuration so that the uploaded files are stored in a blob storage in order to get attached to the email.

I followed the steps and added the patch file to my instance, however, I'm still getting the same result in the sent email.

Any idea what I might be missing in order to be able to attach the uploaded file to the sent email?

4

1 Answer 1

1

I found something that might help you to identify your configuration. While checking the configuration Feature.FormsExtensions.AzureBlobFileStorageProviders.config I found that you need to register the serviceType like this in your patch.

<services>
    <register serviceType="Sitecore.ExperienceForms.Data.IFileStorageProvider, Sitecore.ExperienceForms"
            implementationType="Feature.FormsExtensions.FileStorageProviders.AzureBlobStorageFileStorageProvider, Feature.FormsExtensions"
            lifetime="Transient"
            patch:instead="*[@serviceType='Sitecore.ExperienceForms.Data.IFileStorageProvider, Sitecore.ExperienceForms']" />
</services>

Check this link for the whole patch file.

https://github.com/bartverdonck/Sitecore-Forms-Extensions/blob/master/src/Feature/FormsExtensions/code/App_Config/Include/Feature/FormsExtensions/Feature.FormsExtensions.AzureBlobFileStorageProviders.config.disabled

Update:

You should also check that you have added the processor called AttachFileUploadProcessor that is handling the logic to attach file to SendEmail action. Find the whole source code of this processor in this GitHub link.

https://github.com/bartverdonck/Sitecore-Forms-Extensions/blob/master/src/Feature/FormsExtensions/code/SubmitActions/SendEmail/FileAttachment/AttachFileUploadProcessor.cs

Also it should be in your config like this.

<pipelines>
      <SendEmail role:require="Standalone or ContentManagement or DedicatedDispatch">
        <processor patch:before="*[@type='Sitecore.EmailCampaign.Cm.Pipelines.SendEmail.SendEmail, Sitecore.EmailCampaign.Cm']"
                   type="Feature.FormsExtensions.SubmitActions.SendEmail.FileAttachment.AttachFileUploadProcessor, Feature.FormsExtensions" resolve="true" />
      </SendEmail>

Check the whole config here with this link.

https://github.com/bartverdonck/Sitecore-Forms-Extensions/blob/master/src/Feature/FormsExtensions/code/App_Config/Include/Feature/FormsExtensions/Feature.FormsExtensions.Processors.config

Try this and hope this will solve your issue.

Thanks

2
  • thanks a lot, i tried this solution, and the file is now uploaded to the blob storage, but it's still not attached to the sent email, any idea what might be missing?
    – AME
    Commented May 30, 2023 at 15:38
  • @AME Did you check in your showconfig if are able to find the AttachFileUploadProcessor. Given in this link github.com/bartverdonck/Sitecore-Forms-Extensions/blob/master/… Commented May 31, 2023 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.