简体   繁体   English

如何为CodeIgniter设置PHP mail()

[英]How to set up PHP mail() for CodeIgniter

Do I understand correctly what I read on the CI website for the email class that if I am using PHP mail() that I don't need to do any configuring? 我是否正确理解了我在CI网站上阅读的有关电子邮件类的内容,如果我使用的是PHP mail(),则不需要进行任何配置?

Here is my email in my controller. 这是我在控制器中的电子邮件。 It is not sending. 它没有发送。 We are on a new server and I'm wondering what if anything I need to configure. 我们在新服务器上,我想知道是否需要配置。

$this->email->from('oemsales@xxxx.com', 'OEM Sales');
$this->email->to('shummel@xxxx.com');
$this->email->subject('Contact Page Request');
$this->email->message($message);

$this->email->send();

$message is defined higher up in the code. $ message在代码的上方定义。 This worked on our old server. 这适用于我们的旧服务器。

you can find following information in php.ini file. 您可以在php.ini文件中找到以下信息。 SMTP value contains the address of your mail server, you can change it to your mail server address. SMTP值包含邮件服务器的地址,您可以将其更改为邮件服务器的地址。

[mail function] [邮件功能]
SMTP = localhost SMTP =本地主机
smtp_port = 25 smtp_port = 25

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM