Search

Hello all, new here. Apologies in advance if there's a thread for this.

Recently, I've been tinkering with the Members extension and Symphony's core email sender. I have a gmail smtp setup as recommended through a lot of research. Sendmail wasn't working out.

Everytime you complete a registration form you get this error. The registration comes through fine and appears in my backend sure enough, but no email event is triggered. At a bit of a loss now. Not sure if this is a PHP 5.4 issue or if this is something else completely.

I've attached an image of the error I'm experiencing. Any help on the issue is appreciated.

Cheers

Seems the image didn't attach, here it is again...

arrr

Can you post the HTML of your registration form?

Sure, for quick prototyping I was using the Member Form's by Michael-e, I will attempt my own mark up. Here's the code...

<form action="" method="post">
    <xsl:call-template name="members:input">
        <xsl:with-param name="field" select="'username'"/>
        <xsl:with-param name="event" select="$event"/>
    </xsl:call-template>
    <xsl:call-template name="members:input-password">
        <xsl:with-param name="event" select="$event"/>
        <xsl:with-param name="mode" select="'new'"/>
    </xsl:call-template>
    <xsl:call-template name="members:input-password-confirm">
        <xsl:with-param name="event" select="$event"/>
        <xsl:with-param name="mode" select="'new'"/>
    </xsl:call-template>
    <xsl:call-template name="members:input">
        <xsl:with-param name="field" select="'email'"/>
        <xsl:with-param name="event" select="$event"/>
    </xsl:call-template>
    <xsl:call-template name="members:input-submit">
        <xsl:with-param name="event" select="$event"/>
    </xsl:call-template>
</form>

The actual HTML output would be more helpful.

My bad, here we go (thanks in advance for helping troubleshoot)

<form action="" method="post">
    <div class="input">
      <label for="fields-member-username">Username</label>
      <input type="text" id="fields-member-username" name="fields[member-username]" />
    </div>
    <div class="input">
      <label for="fields-member-password-password">Password</label>
      <input type="password" id="fields-member-password-password" name="fields[member-password][password]" />
    </div>
    <div class="input">
      <label for="fields-member-password-confirm">Confirm Password</label>
      <input type="password" id="fields-member-password-confirm" name="fields[member-password][confirm]" />
    </div>
    <div class="input">
      <label for="fields-member-email">Email</label>
      <input type="text" id="fields-member-email" name="fields[member-email]" />
    </div>
    <div class="input submit">
      <input type="submit" name="action[members-new]" value="Register" />
    </div>
  </form>

Symphony's core email sender

I guess we're talking about the Send Notification Email event filter?

There's documentation for that in the event editor.

Send Notification Email Upon the event successfully saving the entry, this option takes input from the form and send an email to the desired recipient. It currently does not work with ‘Allow Multiple’. The following are the recognised fields:

send-email[sender-email] // Optional
send-email[sender-name] // Optional
send-email[reply-to-email] // Optional
send-email[reply-to-name] // Optional
send-email[subject]
send-email[body]
send-email[recipient] // list of comma-separated author usernames.

All of these fields can be set dynamically using the exact field name of another field in the form as shown below in the example form:

<form action="" method="post">
    <fieldset>
        <label>Name <input type="text" name="fields[author]" value="" /></label>
        <label>Email <input type="text" name="fields[email]" value="" /></label>
        <label>Message <textarea name="fields[message]" rows="5" cols="21"></textarea></label>
        <input name="send-email[sender-email]" value="fields[email]" type="hidden" />
        <input name="send-email[sender-name]" value="fields[author]" type="hidden" />
        <input name="send-email[reply-to-email]" value="fields[email]" type="hidden" />
        <input name="send-email[reply-to-name]" value="fields[author]" type="hidden" />
        <input name="send-email[subject]" value="You are being contacted" type="hidden" />
        <input name="send-email[body]" value="fields[message]" type="hidden" />
        <input name="send-email[recipient]" value="fred" type="hidden" />
        <input id="submit" type="submit" name="action[save-contact-form]" value="Send" />
    </fieldset>
</form>

Okay, after including the hidden fields, the form is submitting (as it was anyway) but now I don't get the error. I get a registration successful, but my inbox doesn't receive the mail.

This is what I think the problem is, otherwise my SMTP settings...

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

Still unsure.

If you are using the Send Notification Email event filter, your recipients must be "author" usernames. It simply doesn't work with Members, as it is intended to provide very basic auhtor notifications, like "A comment has been saved.".

I am rather sure that you should find corresponding errors in the Symphony log. (Something like "Recipient not found.")

If you want to send emails to Members, please install the Email Template Manager extension. It is a bit more complicated, but much more flexible!

Thanks for the reply, good to know. When I get a chance I will try experiment further with the ETM.

Much appreciated for all the help guys.

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