Hi,

I can't get drupal to mail. Either passwords or newsletters (simplenews) won't be sent to the recipents. I work on a test environment which is based on a OSX Tiger installation with MAMP. I used the postfixenabler to enable the postfix mailing program, my mail.app is allowed to mail from localhost. But for drupal there is no result. I also took a look in PHP.ini an changed the the sendmail_path to /usr/sbin/sendmail, but also no result

Is there anybody with the same problem? or can somebody offer a solution?

Thanx in advance.

Grtz

daflow

Comments

daflow’s picture

After a 2 hour session, i got my mac to mail, it seems that my misconfigured posfixenabler was seen as spam by the recipent. Hotmail was accepting my mail like normal. Zo i did a little tweaking on the postfixenabler, and voila, got drupal mailing like a breeze.

Thanx for watching this post ;-)

Grtz daflow

tknospdr’s picture

Don't forget that the MAMP project is not for production servers. It says so right on their front page.

Thanks,
David

neokio’s picture

I'm scratching my brain trying to figure this one out...
Any chance you remember what you did?
What postfix enabler did you use, and what was the tweaking that made it work??
Many thanks!
N

dmurphy’s picture

I was having issues as well, and here's how I fixed it.

First, I used Postfix Enabler, available from cutedgesystems.com . It's $10, but well worth it. Make sure to put a valid domain name in the Masquerade as field.

I edited my php.ini file so that sendmail_path = /usr/sbin/sendmail .

Then in your drupal install, make sure to set a valid email address that drupal sends from. You do that at admin/settings/site-information.

That last bit was the hangup for me. All my messages were getting filtered out because I didn't have a valid email address setup.

There's also some good troubleshooting stuff on cutedgesystems.com if you're still stuck.

Markjdz’s picture

I also set up a test environment with MAMP under OSX Tiger and was getting error messages when Drupal was trying to send emails, either when I created a new user or when I used Contact or the Mass Contact module. In the /var/log/mail.log error log, it looked like it was trying to send it from a username made up of myMacUsername@myComputersName.local.
I'm not sure why this worked, but I solved the problem by adding a line in /etc/postfix/main.cf - the postfix configuration file - that says:
myhostname = mail-hub.optonline.net
which is the mailserver for my email account with my internet provider.

I hope this helps out some other people.

mikeryan’s picture

I've been having the same problem, and found this thread and others on the Web centered on editing myhostname/mydomain/myorigin didn't help. The real problem - my ISP (RCN) appears to have blocked port 25. Solution: edit /etc/postfix/main.cf and add

relayhost = smtp.rcn.com

Hope this helps someone else...

Mike
Cyrve

talino’s picture

Anything else needs to be done for this to work? I've tried for the myhostname and relayhost and none of them worked. I restarted MAMP but still no dice. Am I missing something?

Thanks.

PixelClever’s picture

What I ended up doing to get email working on mamp pro was to edit the php.ini file by going to file > edit template > php5 php.ini (Apparently mamp pro doesn't use the normal php.ini file located in the the mamp directory). In that file I edited the sendmail path like so:

sendmail_path =/usr/sbin/sendmail -t -i -f Aaron@yoursitehere.com

Then I restarted the server and it worked.

ericdfields’s picture

This worked for me too.

Not sure if it helped, but I also set 'myhostname' in /etc/postfix/main.cf to the corresponding mail server.

E.g. 'aaron@yoursitehere.com' in php.ini, so 'mail.yoursitehere.com' in main.cf

loganjr’s picture

We have two instances of Drupal 6. The original installation sends e-mail just fine, but we installed another instance and e-mail is not delivered and no error indicated.

Jim

jonnycrunch’s picture

I have a testing server running on localhost on a Mac os X snow leopard client. Needed email to work as part of my testing.

After a bit of trying, my solution.

edit postfix/main.cf to include:

myhostname = edit-yourregistereddomain-here.com

edit php.ini to include:

sendmail_path = /usr/sbin/sendmail -t -i -f edit-your_email_address_at_your_domain_name-here.com

also edit postfix/generic to include :

user@computername.local edit-email_address@domain_name.com

On my production server, I will need to make sure that my email addresses and server are correct.