oh forgot to answer. Yes it happens with test emails (this is what I 
debugged) and also 
with regular review activity. I suspect that the request.user.email field 
is always coming in as blank.

Shubha

On Thursday, September 15, 2022 at 6:38:39 PM UTC-7 Shubha Ramani wrote:

> Hi Christian. I figured out what the problem was by setting breakpoints in 
> https://github.com/reviewboard/reviewboard/blob/aa089e9ec3140076c18c85a160744b833008662c/reviewboard/admin/forms/email_settings.py
>
> (I set breakpoints in the email_settings.py in my 4.0.10 virtual 
> environment)
>
> Here is what I found:
> * request.user.email is blank !*
> *We are using LDAP for authentication.*
>
> *Below is my pdb debug:*
>
> *if request and request.user.is_authenticated:*
>
> *(Pdb) next*
>
> *> 
> /webapp/PYTHON_VENVS/ReviewBoard-4.0.10-venv/lib/python3.7/site-packages/reviewboard/admin/forms/email_settings.py(131)save()*
>
> *-> to_user = request.user.email*
>
> *(Pdb) dir(request.user)*
>
> *['DoesNotExist', 'EMAIL_FIELD', 'Meta', 'MultipleObjectsReturned', 
> 'REQUIRED_FIELDS', 'USERNAME_FIELD', '__class__', '__delattr__', 
> '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', 
> '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', 
> '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', 
> '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', 
> '__str__', '__subclasshook__', '__weakref__', '_check_column_name_clashes', 
> '_check_field_name_clashes', '_check_fields', '_check_id_field', 
> '_check_index_together', '_check_local_fields', '_check_long_column_names', 
> '_check_m2m_through_same_relationship', '_check_managers', '_check_model', 
> '_check_model_name_db_lookup_clashes', '_check_ordering', 
> '_check_swappable', '_check_unique_together', '_do_insert', '_do_update', 
> '_get_FIELD_display', '_get_next_or_previous_by_FIELD', 
> '_get_next_or_previous_in_order', '_get_pk_val', '_get_unique_checks', 
> '_meta', '_password', '_perform_date_checks', '_perform_unique_checks', 
> '_profile', '_profile_set_cache', '_save_parents', '_save_table', 
> '_set_pk_val', '_state', 'accesstoken_set', 'application_set', 
> 'changedescription_set', 'check', 'check_password', 'clean', 
> 'clean_fields', 'date_error_message', 'date_joined', 
> 'default_review_paths', 'delete', 'directed_drafts', 
> 'directed_review_requests', 'draft'**, 'email'**, 'email_user', 
> 'file_attachments', 'first_name', 'from_db', 'full_clean', 
> 'get_absolute_url', 'get_all_permissions', 'get_deferred_fields', 
> 'get_email_field_name', 'get_full_name', 'get_group_permissions', 
> 'get_next_by_date_joined', 'get_previous_by_date_joined', 'get_profile', 
> 'get_session_auth_hash', 'get_short_name', 'get_site_profile', 
> 'get_username', 'grant_set', 'groups', 'has_module_perms', 'has_perm', 
> 'has_perms', 'has_usable_password', 'id', 'is_active', 'is_admin_for_user', 
> 'is_anonymous', 'is_authenticated', 'is_profile_visible', 'is_staff', 
> 'is_superuser', 'last_login', 'last_name', 'local_site', 
> 'local_site_admins', 'logentry_set', 'natural_key', 'normalize_username', 
> 'oauth2_provider_application', 'oauth_application', 'objects', 'password', 
> 'pk', 'prepare_database_save', 'profile_set', 'refresh_from_db', 
> 'refreshtoken_set', 'repositories', 'review_groups', 
> 'review_request_visits', 'review_requests', 'reviews', 'save', 'save_base', 
> 'serializable_value', 'set_password', 'set_unusable_password', 
> 'should_send_email', 'should_send_own_updates', 'site_profiles', 
> 'status_updates', 'storedconsentdata', 'trophies', 'unique_error_message', 
> 'user_permissions', 'username', 'username_validator', 'validate_unique', 
> 'webapi_tokens']*
>
> *(Pdb) request.user*
>
> *<SimpleLazyObject: <User: shramani>>*
>
> *(Pdb) request.user.email*
>
> *''*
>
>  
>
> On Thursday, September 15, 2022 at 5:11:09 PM UTC-7 Christian Hammond 
> wrote:
>
>> Hi Shubha,
>>
>> We haven't seen reports of e-mail being broken, or encountered it 
>> ourselves. Does it only fail with the test e-mails, or are you also seeing 
>> a lack of e-mails from review request activity?
>>
>> What e-mail server software are you using?
>>
>> Do you have a support contract with us, so we can work with you on some 
>> debug builds?
>>
>> Christian
>>
>> On Wed, Sep 14, 2022 at 5:16 PM Shubha Ramani <[email protected]> 
>> wrote:
>>
>>> I used the exact same settings in 4.0.4. When a  " Send a test e-mail 
>>> after saving" i do not get mail. It seems like ReviewBoard email is broken 
>>> on 4.0.10. 
>>>
>>> To test it I did the following:
>>> Changed the mailserver to *localhost *and the port to* 9025* under E-MAIL 
>>> SERVER SETTINGS, then
>>>
>>> socat -v TCP-LISTEN:9025,fork TCP:<my_mail_server>:25
>>>
>>> I see zero traffic. 
>>>
>>> As I said the same settings used to work in 4.0.4.
>>>
>>> Thanks,
>>>
>>> Shubha
>>>
>>>
>>> -- 
>>> Supercharge your Review Board with Power Pack: 
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons: 
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Review Board Community" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/reviewboard/3c418c55-f406-4ac5-ad07-ec905851efcen%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/reviewboard/3c418c55-f406-4ac5-ad07-ec905851efcen%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> -- 
>> Christian Hammond
>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>> Makers of Review Board <https://www.reviewboard.org/>
>>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/47595eb3-741d-4687-b2d8-1f4714b21d96n%40googlegroups.com.

Reply via email to