Part of the EllisLab Network
   
 
mail() on MAMP?
Posted: 23 December 2007 04:28 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  73
Joined  05-05-2007

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

Profile
 
 
Posted: 23 December 2007 06:41 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  155
Joined  06-06-2007

No, it should work out the box.

 Signature 

Codeigniter - Saving Kittens from Drupal

Web Construction Engineer - NPC Digital - My Site

Profile
 
 
Posted: 23 December 2007 07:08 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  73
Joined  05-05-2007

Hmmm, wondering why it said that it sent the mail but I never received it…

Profile
 
 
Posted: 23 December 2007 01:01 PM   [ Ignore ]   [ # 3 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  4777
Joined  03-23-2006

Do PHP files outside of CodeIgniter work for you to send mail?

mail("your@email.com""test subject""test body"); 

If so, after you’ve sent an email with CI, echo out

$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.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design

Profile
MSG
 
 
Posted: 23 December 2007 02:08 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  853
Joined  11-23-2003

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.)

Profile
 
 
Posted: 23 December 2007 05:09 PM   [ Ignore ]   [ # 5 ]  
Grad Student
Avatar
Rank
Total Posts:  73
Joined  05-05-2007

@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?

Profile
 
 
Posted: 23 December 2007 05:17 PM   [ Ignore ]   [ # 6 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  4777
Joined  03-23-2006

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.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design

Profile
MSG
 
 
Posted: 23 December 2007 05:28 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  853
Joined  11-23-2003

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.

Profile
 
 
Posted: 26 January 2011 09:20 PM   [ Ignore ]   [ # 8 ]  
Summer Student
Total Posts:  1
Joined  09-22-2010

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

Profile
 
 
   
 
 
‹‹ Loops in views      PHP and mssql ››