Email setting on localhost |
[eluser]Musaddiq Khan[/eluser]
AOA, I want email setting on localhost in codeigniter. Is there any special code or library for it. Regards.
[eluser]ojcarga[/eluser]
From the CI side, you don't need any extra library to send mails, CI has its in-built library for that,,, but, working in local, you need to set up a local email server in order to send emails. It is a little tricky, I guess, but there are several guides in internet, however if you have access to an remote server to make tests would be easier.
[eluser]Musaddiq Khan[/eluser]
I think it can be done by setting these variables located in Email library, but I don't know how to set. ------------------------- var $mailpath = "/usr/sbin/sendmail"; // Sendmail path var $protocol = "mail"; // mail/sendmail/smtp var $smtp_host = ""; var $smtp_user = ""; var $smtp_pass = ""; var $smtp_port = "25"; var $smtp_timeout = 5; var $smtp_crypto = "";
[eluser]ojcarga[/eluser]
Do you mean this file /system/libraries/Email.php ?? 1) You should <b>never</b> change any piece of code of any file inside the system folder. 2) They are properties of class CI_Email and they are managed dynamically. Please, read the email class usage http://ellislab.com/codeigniter/user-gui...email.html After you read it and try it for your own, we will be here for further questions
[eluser]InsiteFX[/eluser]
The best way to configure SMTP to work on your localhost is to use your online internet provider settings, then you can send emails to yourself for testing live! I have mentioned and shown how to do this lots of times in the forums. So being as I have Comcast I use my Comcast SMTP email settings. Most providers will have a section on their website to explain to you how to setup your email. Then just change those in your php.ini and never worry about it again! EXAMPLE for Windows 7: Code: [mail function] You can find these also in your current email. |
Welcome Guest, Not a member yet? Register Sign In |