CodeIgniter Forums
How can I test outgoing e-mail? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: How can I test outgoing e-mail? (/showthread.php?tid=65050)

Pages: 1 2


How can I test outgoing e-mail? - Wouter60 - 04-23-2016

I have a controller that sends e-mails, e.g. when a user has forgotten his password. What is the best practice for testing e-mail? I want to know how the e-mail message looks like before it goes live. So I'm looking for a way to test it on my localhost (wamp) or watch the result on my screen.
I've tried:
PHP Code:
$this->email->print_debugger(); 
but it always shows a blank screen. What am I doing wrong here?


RE: How can I test outgoing e-mail? - InsiteFX - 04-23-2016

For Windows I use this, for a Mac etc; you will need to search for one.

Test Mail Server Tool


RE: How can I test outgoing e-mail? - ivantcholakov - 04-23-2016

When I was on Windows I also used the mentioned tool. On Linux I use my gmail account for testing, I send emails from me to me.


RE: How can I test outgoing e-mail? - nguyenanhnhan - 04-23-2016

(04-23-2016, 12:45 AM)Wouter60 Wrote: I have a controller that sends e-mails, e.g. when a user has forgotten his password. What is the best practice for testing e-mail? I want to know how the e-mail message looks like before it goes live. So I'm looking for a way to test it on my localhost (wamp) or watch the result on my screen.
I've tried:
PHP Code:
$this->email->print_debugger(); 
but it always shows a blank screen. What am I doing wrong here?

I using mailtrap to test outgoing email on my project.


RE: How can I test outgoing e-mail? - Wouter60 - 04-23-2016

(04-23-2016, 03:19 AM)InsiteFX Wrote: For Windows I use this, for a Mac etc; you will need to search for one.

Test Mail Server Tool

I don't understand. The documentation of this tool discusses e-mail sent to this tool. Does the tool have it's own e-mail address? Wouldn't it make more sense if it was about e-mails sent from this tool, or by using the SMTP-server of the tool?
After installing this tool, how should I configure the email.php file in application/config/development ?


RE: How can I test outgoing e-mail? - InsiteFX - 04-23-2016

You configure the email smtp port when you install it then you need to set the smtp port in your php.ini file

You can also set the php smtp port to your own internet provider, I have comcast and set it to them when I send an email to my address it goes right into outlook box.


[SOLVED] How can I test outgoing e-mail? - Wouter60 - 04-23-2016

@InsiteFX - Thanks! It works great now.


RE: How can I test outgoing e-mail? - Wouter60 - 04-24-2016

The testing tool works; that is to say: it stores the sent e-mails in the folder I entered in the options dialog.
However, when I open an e-mail message, it turns out that several characters in the message have been replaced by equal-signs. Now that's strange, isn't it? Does anyone have a solution for that?


RE: How can I test outgoing e-mail? - pb.sajjad - 05-03-2016

(04-23-2016, 12:45 AM)Wouter60 Wrote: I have a controller that sends e-mails, e.g. when a user has forgotten his password. What is the best practice for testing e-mail? I want to know how the e-mail message looks like before it goes live. So I'm looking for a way to test it on my localhost (wamp) or watch the result on my screen.
I've tried:
PHP Code:
$this->email->print_debugger(); 
but it always shows a blank screen. What am I doing wrong here?

If you want to use CIĀ Email Class, there is not need to use other tools, mail server, libraries or...!
I use CI Email Library, test all the things in the localhost (wampserver), sned emailĀ and all work correctly.


RE: How can I test outgoing e-mail? - InsiteFX - 05-03-2016

You can also set the php.ini smtp server to use your internet providers smtp server I have Comcast and use their smtp server.