Yakforms comes with native Drupal scripts that can be executed through Drush to automate tasks.
Running the scripts
Drupal scripts can be executed using Drush, a command-line tool for Drupal that your site absolutely needs. They are commonly placed under the
Drupal scripts are written in PHP, with Drush bootstraping Drupal before execution. This gives you access to all functions and variables that you might use in Drupal modules, such as
variable_get, database query functions like
db_selecþ and access to all the hooks provided by installed modules.
To execute your script, just run :
sudo -u www-data drush scr path/to/your/script.php
NB : replace
www-data with your own webserver user, the script won't have the right to execute code from Drupal otherwise.
resend-mail.php: This script allows you to resend all webform emails configured for a form. A few examples where that can be useful :
- Emails were configured for a webform after submissions were collected, and you want to send an email to all submitters.
- Emails were sent to submitters, but were flagged as spam for some reason.
You'll have to edit the
scripts/resend-mail.phpscript file before running it to fill in the NID of the form you want to resend the emails for.