Having some trouble with the Web Forms for Marketers Module (2.3.0 rev.120216) for Sitecore (6.5.0 rev.120472).
I've set up a form with a 'Sent email' action. When the form doesn't have a 'file upload' field, the form sends fine. When it does contain a 'file upload' field, the email wont send and I get a error in the log file:
Parameter name: stream
Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: stream
Source: System
at System.Net.Mime.MimePart.SetContent(Stream stream, String name, String mimeType)
at System.Net.Mail.AttachmentBase..ctor(Stream contentStream, String name, String mediaType)
at System.Net.Mail.Attachment..ctor(Stream contentStream, String name, String mediaType)
at Sitecore.Form.Core.Pipelines.ProcessMessage.ProcessMessage.AddAttachments(ProcessMessageArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters)
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args)
at Sitecore.Form.Submit.SendMessage.ExecuteMail(ID form, AdaptedResultList fields)
at Sitecore.Form.Submit.SendMail.Execute(ID formid, AdaptedResultList fields, Object[] data)
at Sitecore.Form.Core.Submit.SubmitActionManager.ExecuteSaving(ID formID, ControlResult[] list, ActionDefinition[] actions, Boolean simpleAdapt, ID sessionID)
Was wondering if anyone had encountered this/knows a solution?
Thanks in advance!
UPDATE: Have discovered that providing the 'file upload' field is not a required field, when leaving it empty and submitting the form, the email will still send. It will only fail to send when the 'file upload' field is utilised by a user.