nextcloud/data_request

send mail error (sender address rejected)

KevinPolez opened this issue · 2 comments

Hi,

I have configure my nexcloud with SMTP, so default email is admin@yyy.zzz.

When i use "Request personal data" on configuration page connected as "user", i expected a mail sent from default nextcloud mail (in my case : admin@yyy.zzz) to user@yyy.zzz (user is member of admin group). But no email are sent and no warning/error are display.

I have set log_level=0 and mail_smtpdebug=1 on config/config.php

Log result are :

Debug | core | >> MAIL FROM:<user@yyy.zzz>  << 250 2.1.0 Ok  >> RCPT TO:<user@yyy.zzz>  << 553 5.7.1 <user@yyy.zzz>: Sender address rejected: not owned by user admin@yyy.zzz  !! Expected response code 250/251/252 but got code "553", with message "553 5.7.1 <user@yyy.zzz>: Sender address rejected: not owned by user admin@yyy.zzz  " (code: 553) >> RSET  << 250 2.0.0 Ok | 2018-06-05T10:36:56+0200
-- | -- | -- | --
Debug | core | Sent mail to "Array ( [user@yyy.zzz] =>user ) " with subject "Personal data export request"

After reading other issue (#7), I have comment this line :
$message->setFrom([$senderAddress => $senderName]);

For force use default sender email set on config. This resolv my issue, but may be something is wrong with the from fields.

dup of #7, fix in #13