# Importers: What to do when missing email addresses

**URL:** <https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195>\
**Category:** Development\
**Created:** [30.Март.2017 21:00:54 UTC](https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195 "2017-03-30T21:00:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [30.Март.2017 21:26:09 UTC](https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195/2 "2017-03-30T21:26:09Z")

</div>

Just generating an email address won’t be enough. You should definitely disable emails for those users as I’m doing [for anonymous users](https://github.com/discourse/discourse/blob/master/script/import_scripts/phpbb3/importers/user_importer.rb#L94-L99). You could either do this in the base importer or just modify the phpBB importer so that it handles users with missing email addresses similar to anonymous users.

BTW: It’s a good idea to use the [`.invalid` TLD](https://en.wikipedia.org/wiki/.invalid) for generated email addresses (just in case something goes wrong and Discourse starts to send emails to those users). I’m using the following for anonymous users:

```ruby
"anonymous_#{SecureRandom.hex}@no-email.invalid"

```

---

_[View the full topic](https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195)._
