You need to add your PHP installation directory to the
%PATH% environment variable, or work from the PHP installation directory.
To add it to path (The best approach – Edited for Windows 7):
- Right-click on a
My Computer icon
Advanced system settings from the left nav
Environment Variables button
- In the
System Variables section, select
Path (case-insensitive) and click
- Add a semi-colon (
;) to the end of the string, then add the full file system path of your PHP installation (e.g.
- Keep clicking
OK etc until all dialog boxes have disappeared
- Close your command prompt and open it again
Alternatively, you can run
cd <PHP installation path> before you try and run you command, or call your script like
<FULL file system path of php.exe> <path to script>
- How to access PHP with the command Line in Windows
- Run php file in windows cmd
To change the language, go to :
Show advanced options
- Here you can select your Language using the dropdown list
- Restart Teamviewer
I got this article from stackoverflow as always 😀
Use the following code
And dont froget to unable following two security settings in google.
1) https://www.google.com/settings/security/lesssecureapps << turn it on
2) https://accounts.google.com/b/0/DisplayUnlockCaptcha << Click continue
** Turn off 2 step verification if you have it enabled.
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => 'email@example.com', //email id
'smtp_pass' => 'xxxxxxxxxxx', // password
'mailtype' => 'html',
'charset' => 'iso-8859-1'
$this->email->to("firstname.lastname@example.org"); // email array
$this->email->message("my mail body");
$result = $this->email->send();
show_error($this->email->print_debugger()); // for debugging purpose :: remove this once it works...