I assume you are hiding your username by just writing From? Same with from address
Jul 15, 2022
40
Level 1
Laravel SMTP Error
"message": "Expected response code 220 but got code " ", with message "Unable to init new groups for user 'postfix': Operation not permitted System error 1: Operation not permitted" "
This is what i always face when i try to use mail class
public function resend()
{
$to_name = $this->data['user']->username;
$to_email = $this->data['user']->email;
$verify_url = url('verify/' . $this->data['user']->remember_token);
$data = array('verify_url' => $verify_url, 'site_name' => $this->data['site_name'], 'username' => $to_name,);
Mail::send('others.verify', $data, function ($message) use ($to_name, $to_email) {
$message->to($to_email, $to_name)
->subject('Verify Your Email');
$message->from(env('MAIL_USERNAME'), $this->data['site_name']);
});
session()->flash('message', $this->alert('Resent Verification Mail!', 'success'));
return redirect()->to('/dashboard');
}
I tired google smtp , server smtp and elastic mail smtp
MAIL_MAILER=smtp (also tried sendmail )
MAIL_HOST=smtp.elasticemail.com
MAIL_PORT=465 (tried other ports too )
MAIL_USERNAME=From
MAIL_PASSWORD=MYPASS
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=FROM
MAIL_FROM_NAME="${APP_NAME}"
Please or to participate in this conversation.