# Mail by unknown user to group causes error

**URL:** <https://meta.discourse.org/t/mail-by-unknown-user-to-group-causes-error/38945>\
**Category:** Bug\
**Created:** [2 Febbraio 2016, 11:00pm UTC](https://meta.discourse.org/t/mail-by-unknown-user-to-group-causes-error/38945 "2016-02-02T23:00:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Sander78](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sander78/32/296615_2.png) [@Sander78](https://meta.discourse.org/u/Sander78)\
**Post date:** [3 Febbraio 2016, 11:18am UTC](https://meta.discourse.org/t/mail-by-unknown-user-to-group-causes-error/38945/4 "2016-02-03T11:18:53Z")

</div>

A more thorough error:

```plaintext
PG::NotNullViolation: ERROR: null value in column "last_post_user_id" violates not-null constraint DETAIL: Failing row contains (800, Test 12:10, null, 2016-02-03 11:10:44, 2016-02-03 11:14:30.378542, 0, 0, null, null, 0, null, null, null, null, null, 0, null, 0, 0, 0, 0, null, t, 0, f, f, 2016-02-03 11:14:30.378821, f, 0, private_message, null, 0, 0, 0, 0, null, null, 1, 0, user_to_user, test-12-10, null, null, null, null, 1, null, null, f, f, null, null, Test 12:10). : INSERT INTO "topics" ("slug", "title", "archetype", "created_at", "subtype", "fancy_title", "updated_at", "bumped_at") VALUES ('test-12-10', 'Test 12:10', 'private_message', '2016-02-03 11:10:44.000000', 'user_to_user', 'Test 12:10', '2016-02-03 11:14:30.378542', '2016-02-03 11:14:30.378821') RETURNING "id"

```

Edit: @zogstrip, I think I figured it out. Turns out I had a few domains whitelisted for mail. And of course only those are accepted to create a new account. However, the group mailing doesn’t take that into account. The account creation fails, but the group mailing part of Discourse tries to carry on.

---

_[View the full topic](https://meta.discourse.org/t/mail-by-unknown-user-to-group-causes-error/38945)._
