Swiftmailer error 503

Hello,

I’m trying to send an email with this configuration:

'mailer'     => [
			'class'            => 'yii\swiftmailer\Mailer',
			'useFileTransport' => false,
			'viewPath'         => '@common/mail',
			'transport'        => [
				'class'      => 'Swift_SmtpTransport',
				'host'       => 'mail.site.co',
				'username'   => 'tech@site.co',
				'password'   => 'password%',
				'port'       => '465',
				'encryption' => 'ssl',
			],
			'messageConfig'    => [
				'charset' => 'UTF-8',
				'from'    => [$params[ 'noReplyEmail' ] => $params[ 'siteName' ]],
			],
		],

But getting error:

503-Temporary local problem - please try later
503 Valid RCPT command must precede DATA

Any idea how to solve this?

Thanks,

Usually this denotes a problem with the SMTP authentication. Are you sure that your credentials are working?

I got the error, the “from” should be the same as the sender, this server requriements.

1 Like