0

There is a core module (might be related to core actions) that allows your to send an email via VBO. What is the name or where is that function located in core?

For e.g. When I am modifying the system mail settings, what "module" in core provides this functionality? (See screenshot)enter image description here

3 Answers 3

2

There is no "module", at least not one that can be turned on and off like other modules. Emails are normally handled by drupal_mail() and a bunch of other functions found in the system.mail.inc file under /modules/system and mail.inc found in /includes . These work together to create the framework, using templates that you can set up in order for other modules (like VBO) to actually send emails.

drupal_mail():

Sending an e-mail works with defining an e-mail template (subject, text and possibly e-mail headers) and the replacement values to use in the appropriate places in the template. Processed e-mail templates are requested from hook_mail() from the module sending the e-mail. Any module can modify the composed e-mail message array using hook_mail_alter(). Finally drupal_mail_system()->mail() sends the e-mail, which can be reused if the exact same composed e-mail is to be sent to multiple recipients.

5
  • What batch of code provides the re-usable action to send mail in rules then? Commented May 7, 2015 at 19:40
  • I have no idea, and no reason to know. you would have to look through the Rules code for that
    – Geoff
    Commented May 7, 2015 at 19:48
  • It's not provided by rules, it's provided by core for rules. I just need to know which core module has this functionality built in. I realize the core module that provides this functionality provides for more than this feature but one of the modules still provides it. Commented Jun 10, 2015 at 17:32
  • I don't believe there is a 'module' - it is part of the core API using drupal_mail() and related functions as indicated in the answer. I don't know why you keep thinking there's a module - most of core is done through the API, not through actual modules
    – Geoff
    Commented Jun 10, 2015 at 17:36
  • I found it, it is in the system.module api.drupal.org/api/drupal/modules!system!system.module/function/… Commented Jun 10, 2015 at 17:41
1

VBO gets those actions from rules.

The functions are into rules module:

PATH_TO_YOUR_MODULES/rules/modules/system.rules.inc

0

It appears to be a part of the system.module; precisely the system_send_email_action() function.

Not the answer you're looking for? Browse other questions tagged or ask your own question.