Search

i just tried this out for the first time and got it working right off the bat. this is going to be a huge thing for me on future client projects.

thanks a ton, rowan!

I didn't get this working.

@fawx

Did you set up the form on the page "email-contact-details" or have you created a new one?

@anyone

How can I debug the contents of the mail? See what the fields contain?

@vladG

looking back on it now, i'm not sure how i winged it all together. i must have been drinking. i followed rowan's instructions pretty closely, but i simplified the conditions of the email template quite a bit.

to answer your question, yes, i have 2 separate pages. one is the contact form, the other is the email template with a required url parameter (an entry id) and a datasource that filters based on $etf-entry-id, $entry-id.

the pages i am talking about are sitting here if you want to take a look.

Thank you. I'll have a look at them.

You included the sending stuff in contact.xsl:

<input name="send-email[sender-email]" type="hidden"> <!-- let's make a sweet-ass dynamic email address -->
        <xsl:attribute name="class">no-reply@<xsl:value-of select="substring-after($root, 'http://')" /></xsl:attribute>
</input>
<input name="send-email[sender-name]" value="{param-pool/website-name} Website" type="hidden" />
<input name="send-email[subject]" value="New Contact Request" type="hidden" />
<input name="send-email[body]" value="fields[message]" type="hidden" />
<input name="send-email[recipient]" value="admin" type="hidden" />

How did ETF really helped if you still have to include these lines? I thought ETF will hide the recipients, sender and other sensitive information through the Email Template created in the backend.

EDIT

I understood what this extension does.

Now I'm having trouble with the recipient field, but I'll create a new discussion for this.

<filter name="send-email" status="failed">No valid recipients found. Check send-email[recipient] field.</filter>

Thanks, fawx.

That's not ETF stuff, looks like the original send email filter.

If you are using the original send-email filter, you have to provide a Symphony author's username.

@michael-e

so, isn't there a way (any) to add a simple email address to the recipients field?

let's move the discussion here

is there a way to send a message to an email address directly ?

i think i switched from send-email to email-template-filter and just forgot to remove the extra lines.

I am getting the following error, my entry is successfully created but the ETF returns the following error:

file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
    XXX/extensions/emailtemplatefilter/extension.driver.php line 403

    398         $generator = rtrim($generator, '/');
    399         $params = trim($email['params'], '/');
    400         $generator = "{$generator}/{$params}/";
    401         
    402         // Add values:
    403         $email['message'] = (string)file_get_contents($generator);
    404         $email['condition_id'] = $email['id'];
    405         $email['entry_id'] = $entry_id;
    406         
    407         // Remove junk:

Please ignore this error. Was caused by a DNS issue the sub-domain I am working from is not publicly available and therefore the email template cannot be accessed.

Is there a way to enter more then one e-mail address in the recipients-field? Or do I have to create two templates if I wish to send two e-mails on one submit?

I think you can separate them by commas. Maybe.

@nickdunn: tried that, commas, semicolon, spaces... or is there another charactor that does this?

Pull from the repo. I believe rowan has found and fixed that bug :)

How can i send the mail to several recipients? Now i use: {dsorder/entry/email} But this is only 1 email. Thanks

Just got this working great on a 2.2.1 install. Just followed the tutorial in the repo and it worked perfectly first time!

For @wdebusschere - The recipients field takes a comma delimited list. You can use plain text to or xpath to select the recipients.

Great extension - thanks Rowan!

As an aside, can any one tell me how this differs from the creativedutchman's Email Template Manager extension?

As an aside, can any one tell me how this differs from the creativedutchman's Email Template Manager extension?

ETF provides a UI to create your filter and therefore requires no knowledge of PHP. It will send HTML emails to the recipients and has a logging functionality so you can see what emails were sent and when. The tutorial (sending different emails to different addresses depending on a particular option set on the form) is our most common use case at work. Creating your email is done using normal Symphony pages/datasources (and events if you want to).

ETM is more powerful in that you can customise everything, that is, plaintext copy, HTML copy, add attachments and so forth, but it does require you to build a custom event and handle a lot of the logic yourself. Creating your email is done via the backend of Symphony, so is a little different to the usual workflow, but has some nice functionality in that you can ?debug pages in the backend.

ETM does not require custom events anymore. It will provide filter options as the ETF does.

(It does not handle attachments, BTW.)

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