【发布时间】:2022-12-24 11:18:53
【问题描述】:
我正在尝试获取我的应用程序的登录页面,但在输入用户名和密码后,显示错误
无法读取未声明的列“smtp_port”
无法找出此错误背后的原因。
UserPresenter.php
这是演示者类的代码段
$this->mailer = new Nette\Mail\SmtpMailer(array( 'host' => $mailSetting->smtp_server, 'port' => $mailSetting->smtp_port, 'username' => $mailSetting->from_mail, 'password' => $mailSetting->password, 'secure' => $mailSetting->secure_connection, ));SmtpMailer.php
public function __construct(array $options = array()) { if (isset($options['host'])) { $this->host = $options['host']; $this->port = isset($options['port']) ? (int) $options['port'] : NULL; } else { $this->host = ini_get('SMTP'); $this->port = (int) ini_get('smtp_port'); } $this->username = isset($options['username']) ? $options['username'] : ''; $this->password = isset($options['password']) ? $options['password'] : ''; $this->secure = isset($options['secure']) ? $options['secure'] : ''; $this->timeout = isset($options['timeout']) ? (int) $options['timeout'] : 20; if (!$this->port) { $this->port = $this->secure === 'ssl' ? 465 : 25; } $this->persistent = !empty($options['persistent']); }
【问题讨论】:
-
$mailSetting是如何定义的? -
抱歉,无法理解您的问题..