I’ve installed LAMP on my local machine and I’m now looking to add PHP mail, however I’m not having much luck.
I’ve installed postfix and my /etc/postfix/main.cf looks like the following:
myhostname = my_computer_name (is this ok?)
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = my_domain_name, my_computer_name, localhost.localdomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
Can someone please tell me what I’m missing? Is myhostname supposed to be my computers name or something else? Same with mydestination. Does it need a relayhost?
Cheers
Do a php info to see whats installed
http://php.net/manual/en/function.phpinfo.php
Follow a real back to basics example like this (to determine if it is code-based or configuration based)
In my experience it usually works out of the box, you might have to investigate other things like this link here:
http://email.about.com/od/emailprogrammingtips/qt/Configure_PHP_to_Use_a_Local_Mail_Server_for_Sending_Mail.htm