Diskusi Fauzan Shidqi, S.Si
Selesai

Fauzan Shidqi, S.Si
15 hari yang lalu
Terjadi kesalahan Mailtrap submit forgot password
Hello kak saya ingin melakukan forgot password menggunakan mailtrap.io. dan saya sudah ikuti langkahnya. pas saya submit forgot password terjadi kesalahan pada bagian Symfony\Component\Mailer\Transport\ Smtp\Stream\SocketStream :154 kodingan nya yaitu throw new TransportException(sprintf('Connection could not be established with host "%s": ', $this->url).$msg);. Berikut kodingan nya kak: $this->url = 'ssl://'.$this->url; } $options = []; if ($this->sourceIp) { $options['socket']['bindto'] = $this->sourceIp.':0'; } if ($this->streamContextOptions) { $options = array_merge($options, $this->streamContextOptions); } // do it unconditionnally as it will be used by STARTTLS as well if supported $options['ssl']['crypto_method'] = $options['ssl']['crypto_method'] ?? \STREAM_CRYPTO_METHOD_TLS_CLIENT | \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; $streamContext = stream_context_create($options); $timeout = $this->getTimeout(); set_error_handler(function ($type, $msg) { throw new TransportException(sprintf('Connection could not be established with host "%s": ', $this->url).$msg); }); try { $this->stream = stream_socket_client($this->url, $errno, $errstr, $timeout, \STREAM_CLIENT_CONNECT, $streamContext); } finally { restore_error_handler(); } stream_set_blocking($this->stream, true); stream_set_timeout($this->stream, $timeout); $this->in = &$this->stream; $this->out = &$this->stream; } public function startTLS(): bool
1 Jawaban

Muhammad Fakhry Burhanuddin
15 hari yang lalu
Hi Fauzan, Tolong paste ulang kodenya di https://codepile.net dan errornya discreenshot saja.