0

When I user saves a piece of "my_custom_content_type" I want to send the user an email, basically "your content has been submitted, will be published after review" I know this is a core feature for webforms, but what is the best way to accomplish this for Custom Content Types?

6

One easy way to do that is with the Rules module

  • Event: After saving new content
  • Action: Send email.

Here's an example Rules export (for article) that can be imported via the UI at admin/config/workflow/rules/reaction/import

{ "rules_review_notification" : {
    "LABEL" : "Send review notification email",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--article" : { "bundle" : "article" } },
    "DO" : [
      { "mail" : {
          "to" : [ "node:author:mail" ],
          "subject" : "[Notification] Content submitted for review",
          "message" : "Your content has been submitted and will be published after review."
        }
      }
    ]
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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