Sitecore (6.5.0 rev.120472) 的营销人员 Web 表单模块 (2.3.0 rev.120216) 遇到一些问题。
我已经设置了一个带有“已发送电子邮件”操作的表单。当表单没有“文件上传”字段时,表单发送正常。当它确实包含“文件上传”字段时,电子邮件将不会发送,并且我在日志文件中收到错误:
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)
想知道是否有人遇到过这个/知道解决方案?
提前致谢!
更新:发现提供“文件上传”字段不是必填字段,将其留空并提交表单时,电子邮件仍将发送。只有当用户使用“文件上传”字段时,它才会发送失败。