This will throw an exception if it's not set, and not get to your error below.  Could be simpler as:

```python
if hasattr(settings,"WILL_DEFAULT_FROM_EMAIL):
    from_email = settings.WILL_DEFAULT_FROM_EMAIL
else:
   raise ValueError("etc")
```

Or, use a getattr with default None.