Quantcast
Channel: DreamFactory Forum - Latest topics
Viewing all articles
Browse latest Browse all 1524

Need help with user.register.post.post_process script

$
0
0

@allensandiego wrote:

Hi,

I'm trying to get an email sent to the user after registration. (Using Open Registration without confirmation). Using DF 2.0 in AWS by Bitnami.

So I created a script in user.register.post.post_process. (V8js)

var_dump(event.request); // outputs to file in storage/log of dreamfactory install directory
var lodash = require("lodash.min.js");

if (event.request.payload.resource) {
    lodash._.each (event.request.payload.resource, function( record ) {
	var payload = {
  "template": "User Registration Default",
  "template_id": null,
  "to": [
    {
      "name": "Allen Sandiego",
      "email": "email@domain.com"
    }
  ],
  "cc": [
    {
      "name": "",
      "email": ""
    }
  ],
  "bcc": [
    {
      "name": "",
      "email": ""
    }
  ],
  "subject": "Test",
  "body_text": "Test",
  "body_html": "",
  "from_name": "Admin",
  "from_email": "admin@domain.com",
  "reply_to_name": "",
  "reply_to_email": ""
}
	platform.api.post('email', JSON.stringify(payload));

    });
}`

However, I'm not receiving any email. Where do I check the logs to get more information?

Thanks,
Allen

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1524

Trending Articles