php – 使用Codeigniter发送邮件
发布时间:2020-12-13 15:56:04 所属栏目:PHP教程 来源:网络整理
导读:它是我的控制器 $to = "goeboekimutcs@gmail.com"; $subject = "Goeboek I-Mut"; $content = "htmlbodypTest Content/p/body/html"; $headers = "From: goeboekimutcs@gmail.com"; mail($to,$subject,$content,$headers); 这是我的php.ini ; XAMPP: Comment
它是我的控制器
$to = "goeboekimutcs@gmail.com"; $subject = "Goeboek I-Mut"; $content = "<html><body><p>Test Content</p></body></html>"; $headers = "From: goeboekimutcs@gmail.com"; mail($to,$subject,$content,$headers); 这是我的php.ini ; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder) sendmail_path = ""D:Programsxamppsendmailsendmail.exe" -t" ; XAMPP: Comment out this if you want to work with mailToDisk,It writes all mails in the D:Programsxamppmailoutput folder ; sendmail_path="D:Programsxamppmailtodiskmailtodisk.exe" 这是我的sendmain.ini smtp_server=smtp.gmail.com ; smtp port (normally 25) smtp_port=587 auth_username= goeboekimutcs@gmail.com auth_password= ** 我在我的浏览器上打开我的控制器,加载后,我刷新我的Gmail,但没有电子邮件来…有时它发送,但往往不发送.发生什么事? 解决方法
最好使用一些第三方库来发送像PHPMailer这样的电子邮件,这可以为您节省很多麻烦.您需要做的就是设置一些初始配置.
您可以在此处获取最新更新以及用法: PHPMailer Github link (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |