【问题标题】:MODX Revolution and Formit plugin: not sending mail attachmentsMODX Revolution 和 Formit 插件:不发送邮件附件
【发布时间】:2016-06-15 09:49:33
【问题描述】:

使用 MODX Revolution 和 Formit,我尝试将文件附加到联系表单。邮件已发送,但没有附件。出于某种奇怪的原因,我再也找不到有关附件挂钩的任何信息。最近是否从 Formit 中删除了该功能?

[[!FormIt?
   &hooks=`spam,email,attachments,redirect`
   &emailTpl=`sometemplate`
   &emailTo=`foo@foo.com`
   &emailBCC=`foo2@foo.com`
   &emailSubject=`some subject`
   &redirectTo=`123`
   &validate=`name:required, filedata:required`
]]

<form action="[[~[[*id]]]]" method="post" class="form" enctype="multipart/form-data">
    <input type="text" name="name" id="name" value="[[!+fi.name]]">
    <input id="filedata" name="filedata" type="file" value="[[+fi.filedata]]">
    <button type="submit">SEND</button>
</form>

再次发送邮件(我尝试了许多不同的电子邮件地址),但附件总是丢失。怎么了?

【问题讨论】:

    标签: modx-revolution formit


    【解决方案1】:

    你试过https://modx.com/extras/package/ajaxupload2额外吗?

    来自描述:

    With two FormIt hooks the upload queue could be pre filled from a FormIt field
    value and be saved into a FormIt field value. With a third FormIt hook the
    uploaded files could be attached to the FormIt mails.
    

    【讨论】:

      【解决方案2】:

      只需将钩子“附件”放在一边,formit 会在没有该钩子的情况下处理文件输入。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多