SMTP error when trying to reset password

Hi, I get an error when trying to reset my password from the panel. The error message is: SMTP Error: data not accepted.

I have a form on the site that is sent via SMTP set in config like this:

<?php

return [
	'debug' => true,
	'auth' => [
		'methods' => ['password', 'password-reset']
	],
	'email' => [
		'presets' => [
			'contact' => [
				'from' => 'noreply@example.com',
			]
		],
		'transport' => [
			'type' => 'smtp',
			'port' => 587,
			'security' => 'tls',
			'host' => 'smtp.office365.com',
			'auth' => true,
			'username' => 'noreply@example.com',
			'password' => '...',
		]
	],
];

I receive the reset password email if I delete the above settings in config.
Seems to be the same error as Password reset - SMTP Error: data not accepted But I do not find a solution in the referenced documentation.

I solved it by adding this to the config:

'auth' => [
	'methods'   => ['password', 'password-reset'],
	'challenge' => [
		'timeout' => 5 * 60, // 5 minutes
		'email' => [
			'from' => 'noreply@example.com'
		]
	]
],

Thanks!

1 Like