spf запись для домена учетки, от которой отправляете - есть?
private function establishSocketConnection()
{
$host = $this->params['host'];
if (!empty($this->params['protocol'])) {
$host = $this->params['protocol'].'://'.$host;
}
$timeout = 15;
if (!empty($this->params['timeout'])) {
$timeout = $this->params['timeout'];
}
$options = [];
if (!empty($this->params['sourceIp'])) {
$options['socket']['bindto'] = $this->params['sourceIp'].':0';
}
$options['ssl']['verify_peer'] = false;
$options['ssl']['verify_peer_name'] = false;
if (isset($this->params['stream_context_options'])) {
$options = array_merge($options, $this->params['stream_context_options']);
}
$streamContext = stream_context_create($options);
$this->stream = @stream_socket_client($host.':'.$this->params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext);
if (false === $this->stream) {
throw new Swift_TransportException(
'Connection could not be established with host '.$this->params['host'].
' ['.$errstr.' #'.$errno.']'
);
}
if (!empty($this->params['blocking'])) {
stream_set_blocking($this->stream, 1);
} else {
stream_set_blocking($this->stream, 0);
}
stream_set_timeout($this->stream, $timeout);
$this->in = &$this->stream;
$this->out = &$this->stream;
}
'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],
MAIL_DRIVER=smtp
MAIL_HOST=smtp.yandex.ru
MAIL_PORT=465
MAIL_ENCRYPTION=SSL
<template>
<!-- Обязательно код оборачивать в любой тег -->
<form>
<div class="form-group row">
<label for="inputEmail3" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input v-model="user.email" type="email" class="form-control" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary" @click.prevent="submitEmail()">Sign in</button>
</div>
</div>
</form>
</template>
<script>
export default {
data() {
return {
user: {email:''},
errors: []
}
},
methods: {
submitEmail() {
axios.post(`user/email`, this.user)
.then((response) => {
console.log(response.data.data)
})
// Ошибки из ларавелевской переменной $errors
.catch((error)=> {
this.errors = error.response.data.errors;
})
}
}
}
</script>
<div id="app">
<form-component></form-component>
</div>