CodeIgniter Forums
mail() on MAMP? - 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: mail() on MAMP? (/showthread.php?tid=4916)



mail() on MAMP? - El Forum - 12-23-2007

[eluser]Ludwig Wendzich[/eluser]
Hey,

I'm developing on a MAMP server and am trying to use the Email Library.

I get a confirmation stating that the email has successfully sent but I don't receive it.

Does MAMP need configuration to send email using mail()?


Thanks,
Ludwig


mail() on MAMP? - El Forum - 12-23-2007

[eluser]kevinprince[/eluser]
No, it should work out the box.


mail() on MAMP? - El Forum - 12-23-2007

[eluser]Ludwig Wendzich[/eluser]
Hmmm, wondering why it said that it sent the mail but I never received it...


mail() on MAMP? - El Forum - 12-23-2007

[eluser]Derek Allard[/eluser]
Do PHP files outside of CodeIgniter work for you to send mail?
Code:
mail("[email protected]", "test subject", "test body");

If so, after you've sent an email with CI, echo out
Code:
$this->email->print_debugger();
and it'll give you a bit more information. If it says all was successful, then CI has done the job of handing off a properly formed email to your mail server, and the problem is either at your ISP sending out, or receiving.


mail() on MAMP? - El Forum - 12-23-2007

[eluser]John Fuller[/eluser]
Email is hard enough to send from regular servers, let alone your laptop at home (if that is where you are sending from.) The problem is email filters and you could be getting filtered either by your ISP (outgoing on port 25) or by your email provider (incoming.) Some email providers won't let anything through that originates from a known dynamic IP. Other providers just don't let anything through at all without jumping through a bunch of hoops (Hotmail.)

One strategy to pretty well defeat these problems is to use a relay service and then configure your app to send out via the SMTP settings on that service. One example is authsmtp.com. Unfortunately they limit the amount of email you can send out in one day (depending on the account level) as well as other limits. For certain apps it should work just fine though.

On my main server I can't reach anything without setting up things like SPF and reverse DNS records. Different providers even require different strategies. By using a relay service you get to piggy-back on their trust level.

Edit: Actually, trust should not be a problem sending from your ISP either, except for blocking dyamic IPs. Make sure your ISP is not blocking outgoing from port 25. If they are, try setting the outgoing mail to use their SMTP settings (username, password.)


mail() on MAMP? - El Forum - 12-23-2007

[eluser]Ludwig Wendzich[/eluser]
@Derek; I tried using mail(), with no results...and the debugger says everything worked fine..

@john; I have no idea how to do that >.< Would it be best to upload everything and test email on the actual server?


mail() on MAMP? - El Forum - 12-23-2007

[eluser]Derek Allard[/eluser]
Well, I can't offer any advice on configuring mamp (just don't know enough about it) but it does appear to be a problem at the server level.


mail() on MAMP? - El Forum - 12-23-2007

[eluser]John Fuller[/eluser]
If all else fails, you might just upload it to your server. I don't know about everyone else but I do all my development directly on my server anyways.

There are just too many unknowns with sending email from home. Different ISPs have different restrictions. It is hard to say what might be going on.


mail() on MAMP? - El Forum - 01-26-2011

[eluser]Unknown[/eluser]
Hi everybody, I know this is an old post. But I just want to say something. mail() in PHP works just on MAMP PRO, not in MAMP.

Thank you