Search

I'm trying to get this form flow to work properly but I'm running into a weird issue where the submission works, but the default "Save Message" event returns an error.

Here is the markup I'm using:

<form id="generalForm" class="general form" method="post" action="?debug" enctype="multipart/form-data">
    <fieldset class="form-fieldset">
        <label class="label">
            <div class="label-container cf">
                <span class="label-text">Name<small class="label-small">(required)</small></span>
                <input class="label-input" type="text" name="fields[name]" data-required="true" value="">
            </div>
        </label>
        <label class="label">
            <div class="label-container cf">
                <span class="label-text">Email Address<small class="label-small">(required)</small></span>
                <input class="label-input" type="text" name="fields[email]" data-required="true" value="">
            </div>
        </label>
        <label class="label">
            <div class="label-container cf is-select-dropdown">
                <span class="label-text">Subject<small class="label-small">(required)</small></span>
                <select class="input-select" name="fields[subject]">
                    <option value="general-inquiry" data-recipient="feedback">General inquiry</option>
                    <option value="distribution-inquiry" data-recipient="distribution">Distribution Inquery</option>
                    <option value="site-feedback" data-recipient="feedback">Site Feedback</option>
                    <option value="sales-inquiry" data-recipient="sales">Sales Inquiry</option>
                </select>
            </div>
        </label>
        <label class="label">
            <div class="label-container cf is-textarea">
                <span class="label-text">Message<small class="label-small">(required)</small></span>
                <textarea class="input-textarea" name="fields[message]" rows="5" cols="21"></textarea>
            </div>
        </label>
        <input name="send-email[recipient]" value="dtan" type="hidden">
        <input name="send-email[reply-to-email]" value="fields[email]" type="hidden">
        <input name="send-email[reply-to-name]" value="fields[name]" type="hidden">
        <input name="send-email[subject]" value="fields[subject]" type="hidden">
        <input name="send-email[body]" value="fields[message],fields[subject],fields[email],fields[name]" type="hidden">
        <label class="label">
            <div class="label-container cf">
                <input id="submit" class="form-button input-submit" type="submit" name="action[save-message]" value="Send">
            </div>
        </label>
    </fieldset>
</form>

and here is the event being returned:

<events>
    <save-message result="success" type="created" id="197">
        <message>Entry created successfully.</message>
        <filter name="send-email" status="failed">
            <error error-type="address">
                <message recipient="email@email.com">Sender email address cannot be empty.</message>
            </error>
        </filter>
        <post-values>
            <name>test</name>
            <email>test@tea.com</email>
            <subject>general-inquiry</subject>
            <message>sadf</message>
        </post-values>
    </save-message>
</events>

What I don't get is why I am getting the filter error back but when I go to the admin, under the Messages, this message is saved, but I never receive a notice about a message coming through. Also, since this "error" occurs, the frontend then throws this error out there:

The system encountered technical problems while sending your email.

But as you can see from the event output the email was filled out and passed along properly to the event.

has anyone experienced this before or know what may be going?

thanks

Please take a look at your event's documentation in the Symphony backend. When you have added the Send Email Notification filter, you will also find a documentation for this filter. You will find instructions how to set certain fields dynamically, e.g.:

<input name="send-email[sender-email]" value="fields[email]" type="hidden" />

I guess this is what you need.

thanks michael. That did the trick in removing the error from returning. however, it's not actually sending the email notification saying someone has used the form. would this be a server config issue or a symphony issue then? I'm on dreamhost for and have not run into this problem before there.

Anything in Symphony's log?

You might run into problems with the sender email being dynamic. Try to send from a "native" address (which belongs to the SMTP account resp. the server/webspace) and just set send-email[reply-to-email] dynamically.

Check that the from name and from email address in preferences section are filled in. That caught me out the other day because I had assumed I had filled them in but hadn't.

dave, i saw that those fields were empty in the preferences, filled them in but it still does not seem to send. I think it actually had to go back to michael's comment about the address having to belong to the server mail account (actually using sendmail, not SMTP). The recipient is my personal email address that is just a gmail address. But when I switched the user to use a valid email address (though using gmail-hosted email) from under my client's domain, the email sent.

thanks for the help!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details