3

Based on your code - and our comments - you need something like this: <form id="someFormId"> <input type="hidden" name="action" value="sproutForms/entries/saveEntry"> <input type="hidden" name="handle" value="test"> <input type="hidden" name="redirectOnFailure" value="{{ craft.request.getUrl() }}"> <!---some more ...


3

I'm not sure if the Sprout Email plugin can do anything to help you or not, but I can think of a few options that would involve simple, custom plugins. Every user has a "Require a password reset on next login" that an administrator can set from the CP under their settings. You probably don't want to do that manually for 3,000 users, but a simple plugin (or ...


3

You can delete that folder entirely and it will get re-created on the next request that needs a template. If it's not updating, chances are you've got some PHP byte-level caching extension installed like APC or OPcache that's not busting cache properly.


3

This issue has been resolved in Sprout Email v1.0.4


3

You're understanding the purpose of the Hidden and Invisible fields correctly and your desired workflow is possible. Let's step through each part: Hidden and Invisible Fields These fields allow you to capture values on the page that the user doesn't see. This includes any variable available to the page your form is being submit on. The key thing to note ...


3

By default, several fields do not display in the default Email Template such as the Hidden Field, Invisible Field, Section Heading Field, Private Notes Field, and Custom HTML field. If you'd like to display any or all of those fields, you can override the default email template by in your Notification Email settings. Select the "Custom Templates" option and ...


3

At the most simple level, if you have a Notification Email configured with the event 'None', you can do the following: $mailer = SproutBaseEmail::$app->mailers->getMailerByName(DefaultMailer::class); $notificationEmail = Craft::$app->elements->getElementById(123); $mailer->sendNotificationEmail($notificationEmail); If you have an Event ...


2

This was a bug and has been fixed in Sprout Email v2.0.2.


2

The Sprout Email Example Notification templates are designed to illustrate an example of the the Events that take place when a user is saved. They illustrate how to set custom variables for the User Events in both the Control Panel and in the template itself. While in most cases, you won't need to customize things in both places, the example is meant to be ...


2

Had a typo in my template directory.


2

This error can be triggered when you try to use a variable name in your Sprout Email template or fields that is not present in the submitted Form data. One example where this can occur is if you try to reuse the example Welcome Notification email provided in Sprout Email and don't update the {email} or {username} values in the HTML and Text body fields. I'...


2

It might be that you're trying to parse the variables within quotes " as you set email so you're actually encoding {{ emailContact.emailField }} as a string, not the value it represents. Something like this should work: {% set email = "<a href='mailto:" ~ emailContact.emailField ~ "'>" ~ emailContact.emailField ~ "</a>" %} {{ email|rot13 }}


2

Sprout Email allows Craft Object Syntax for the object that is available when an event is triggered, in the same way you would use the Sections Title Format field. If your form is submitting an Entry the dynamic object being submitted is an EntryModel and all values from that EntryModel will be available to several of your fields in Sprout Email. To access ...


2

Figured out what my problem was: I was trying to submit the form via Ajax, that's why the submit button is set to input type="button" I changed the submit button to input type="submit" & it worked. Not 100% sure how to make it work with Ajax but pretty sure it has something to do with the way the data is serialized. I don't really need Ajax submission ...


2

Variables in Craft are case sensitive. You'll run into the same error if you try to output the Craft {{ siteName }} global as {{ SITENAME }}. Updating the casing to {contactFullName} or {{ object.contactFullName }} should get things working for you. An extra note regarding the comments above. Luke is onto the right answer in the comments, however, one ...


2

The docs at the time of the question reference an old classname in the C3 example, the two Notification Email related classes in your code are now in a module named sprout-base-email: NEW use barrelstrength\sproutbaseemail\services\NotificationEmailEvents; use barrelstrength\sproutbaseemail\base\NotificationEvent; OLD use barrelstrength\sproutbase\app\...


2

Thanks Ben. Thought I had very latest version of the plugin, but just updated both Craft and plugin, and problem solved!


2

This is expected behavior. This feature was changed due to a security vulnerability and is mentioned in the upgrade notes. To create similar behavior you will need to confine your dynamic variables in the Control Panel to the Subject or Default Body fields. Any other custom variables will need to be added and managed in a custom email template. We will ...


1

This is possible with the Sprout Forms Invisible Field (be sure to update to the latest version). Using the Invisible Field will ensure your email address never shows up in the template. To set this up: 1) Add an Invisible Field (invisibleFieldHandle) to your form and set its value to {recipient} 2) Setup a Notification Email and set your Recipient field ...


1

First, we'll be adding native support for localization in Craft 3. This is a bit trickier in Craft 2 right now. Two thoughts. You could set up 3 different emails (each managed in a different language) to be triggered off the same event. Not ideal, but an option. Aside from that, Sprout Email does run the subjectLine field through renderObjectTemplate so ...


1

Although the Sprout Email docs state it is preferable to use shorthand syntax for variables in notifications, I found this to not be the case for the Notification subject line. So using {companyName} in the subject would cause the issue shown above. {{object.companyName}} fixes this.


1

This can be done using an Invisible Field and the addFieldVariables tag. Define the value you want as your email in your template: {% do craft.sproutForms.addFieldVariables({ 'secretEmailAddress': entry.author.email }) %} Set the Invisible Field to target that value: {secretEmailAddress} And then customize the Notification Email Recipients field to ...


1

We got to the bottom of this issue and it turned out to be that the SproutEmail_SubscribeEvent::validateOptions() method was returning false. Updating this to ensure the options were being validated properly fixed the issue: public function validateOptions() { return true; } We've updated the docs and will also more clearly document this in the ...


1

The docs state that the following events are available from Sprout Email: When a new entry is created When an existing entry is updated When a new user is created When a existing user is updated When a user is activated When a user is deleted When a user logs in I think changing the status of an entry would trigger the "existing entry is updated". Not ...


1

There is also this EmailObfuscate plugin for Craft CMS which seems to add obfuscation via filter on strings. {{ entry.body|emailObfuscate }}


1

If you're using the SEOmatic plugin, it exposes an encodeEmailAddress() function that you can use in your templates: https://github.com/nystudio107/seomatic/wiki/15.-Utility-Filters-&-Functions#encodeemailaddress


1

You can do this in Sprout Email by creating a Custom Event Integration. I'm not familiar with Postmaster. While Sprout Email comes with a When an Entry is Saved event, it's not going to work for you because the Users field submits data via User IDs to create the relations and you can't create a list of recipients from the IDs along, before some extra ...


1

If I'm correct in thinking that you want users who have been added to a relation field on an entry to receive an email, then the following will work. You will have to write a plugin to listen for the onSaveEntry event. You can then loop through any users added to the custom field of the entry and send them an email. The code would look something like the ...


1

These two items are unrelated. First, there's no need to worry about the deprecation errors. We actively maintain our plugins and will have them resolved before they should have any effect on general use of our plugins. We've made a feature request to Craft to consider to reduce the prominence of the deprecation message, as it generally just causes ...


1

I don't think this is a bug. If you are saying that you are using a custom plugin on creating a user you will have to define an on onSaveUser event after the save user script. E.g. craft()->users->onSaveUser(new Event($this, array( 'user' => $user, 'isNewUser' => $isNewUser ))); Sprout Email uses Craft events to trigger the ...


Only top voted, non community-wiki answers of a minimum length are eligible