CodeIgniter Forums
Sending EMail From Code Igniter 2.0.1 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Sending EMail From Code Igniter 2.0.1 (/showthread.php?tid=40141)

Pages: 1 2 3


Sending EMail From Code Igniter 2.0.1 - El Forum - 04-03-2011

[eluser]Madmartigan1[/eluser]
OK, I finally figured this out.

In my php ini, I had to do this:

Quote:[mail function]
; For Win32 only.
;SMTP = 192.168.1.100 <--- Remove Linksys Router IP
SMTP = 127.0.0.1 <--- Add Local IP
smtp_port = 25

Now everything works using the mail protocol. I'm not sure what is up with this because it used to work with another mail client. I just have no clue about this stuff...

InsiteFX, thank you so much for your help and sharing that tool, this is a huge deal for me - now I don't have to turn email debugging off for live sites (or use it at all actually) and I can get a more realistic experience while testing.


Sending EMail From Code Igniter 2.0.1 - El Forum - 04-03-2011

[eluser]InsiteFX[/eluser]
Thats strange! I have a linksys E2000 gigbit router but my SMTP was remarked out I had to add it.

Another thing you can do but only on windows is this.

c:\Windows\System32\drivers\etc

And edit the hosts file and add this line
Code:
127.0.0.1 localhost

Now you can specify localhost instead of 127.0.0.1

InsiteFX


Sending EMail From Code Igniter 2.0.1 - El Forum - 04-03-2011

[eluser]raiser[/eluser]
Thank you very much InsiteFX....

Your code works well in local server.. I used with the suggested mail server. It works well..

If i want to send the mail in server means what are the changes should i do? Can u give me some ideas for that?

Kindly reply.........


Sending EMail From Code Igniter 2.0.1 - El Forum - 04-04-2011

[eluser]InsiteFX[/eluser]
You would need to get your smtp values from your hosting provider and then make the changes to the
application/config/email.php file that should be the only changes you would need

Code:
$config['smtp_host']    = "";
$config['smtp_user']    = "";
$config['smtp_pass']    = "";
$config['smtp_port']    = "";
$config['smtp_timeout']    = 5;

InsiteFX