Skip to content

Commit 435a99f

Browse files
author
Marius Burkard
committed
- added smtp ssl options for self-signed certs etc.
1 parent 79a8398 commit 435a99f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

interface/lib/classes/ispcmail.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,10 @@ private function _smtp_login() {
602602
if($this->smtp_crypt == 'tls') {
603603
fputs($this->_smtp_conn, 'STARTTLS' . $this->_crlf);
604604
fgets($this->_smtp_conn, 515);
605+
606+
stream_context_set_option($this->_smtp_conn, 'ssl', 'verify_host', false);
607+
stream_context_set_option($this->_smtp_conn, 'ssl', 'verify_peer', false);
608+
stream_context_set_option($this->_smtp_conn, 'ssl', 'allow_self_signed', true);
605609
stream_socket_enable_crypto($this->_smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
606610
}
607611

0 commit comments

Comments
 (0)