Sending email with CodeIgniter using 'mail' or 'sendmail'

依然范特西╮ 提交于 2019-12-04 13:45:57

OK - this was simple.

For anyone who faces this issue:

  1. First check if sendmail (actually Postfix) is installed. I am using Ubuntu 11.x.

cd usr/sbin/

  1. If you can't find sendmail, then it needs to be installed
sudo apt-get install postfix
  1. I accepted the default options on the dialogs and once install was complete, emails sent without a problem.

In windows os , i have tried sendmail class.
You have to put sendmail.exe,sendmail.ini, and other two .dll files inside,

C:\wamp\sendmail

configure sendmail.ini file as follow for gmail server :

[sendmail]

smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=tls
error_logfile=error.log
debug_logfile=debug.log
auth_username=mymail@gmail.com
auth_password=mypassword
hostname=smtp.gmail.com

then edit your php.ini file, that is available inside

C:\wamp\bin\apache\Apache2.2.17\bin

sendmail_path="C:\wamp\sendmail\sendmail.exe -t -i"

Now run your project, see log files at:

C:\wamp\sendmail\error.log C:\wamp\sendmail\debug.log

i think this post can help you..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!