Here's what I run into:
1. First, I am running everything on localhost so that I can test/sandbox my work. I do not have my own Internet domain name yet, it's all localhost.
2. My php.ini has been updated as follows:
Code: Select all
sendmail_path = "/usr/sbin/sendmail -t"Code: Select all
$toaddress = "myemailaddress@myemailaddress.com";Code: Select all
$fromaddress = "From: myemailaddress@myemailaddress.com";4. I run the html file (it is a simple feedback form that executes the mail.php file) in my localhost browser and submit the form. I get NO visible errors when I submit (i.e. it echoes the success response to my browser). HOWEVER, I am trailing the mail log in my Terminal and it shows that multiple "Operation timed out" responses. Additionally, my mailq file shows all of my 30 attempts to submit the email (i.e. 30 times that I clicked "send" in the html form).
5. I then used the following from scripts I could gather on the Internet, none of these worked either.
5a. Updated the hostconfig file by adding the following line:
Code: Select all
MAILSERVER=-YES-Code: Select all
myhostname = example.yahoo.comCode: Select all
relayhost = smtp.gmail.comSaved my files, gracefully restarted Apache, reloaded postfix, opened up the Terminal and started my tail. Executed my html form (and subsequently the mail.php) and still get the "Operation timed out" response in the tail with all my attempts getting queued up in the mailq.
I am stuck -- all I want to do is experiment with the mail() function in PHP on my localhost Macbook Pro without actually sending email. Do I just need to go the distance and get a domain name with a mail server in order to try this? I have searched the internet and a lot of forums but have been finding that the people who asked the question have not received a response.
Many many thanks in advance!