I asked this over on stackoverflow. They pointed me here.
I would love to be able to test php webapps that require emailing registration info etc. on my
mac. I downloaded a version of CommuniGate Pro. I need to mail either to an account inside or outside (whichever is best) of the localhost. Again this would be used for testing purposes to verify and debug my code prior to uploading to a hosting service. Any ideas, help and/or examples would be very much appreciated. If it would be easier I could go over to Windows XP. That would just mean setting up wamp and transfering my files over from the
mac side via dropbox.
I got the local mailserver to work so I can send emails between accounts. However, I cannot seem to get the php code to work. I know that I am missing something.
I see where this has been asked before. I want to add that I am using xampp. In
Mac OS 10.6.8. I tried changing the php.ini SMTP command to macintosh-3.local.
<?php
function email($to, $subject, $body, $headers) {
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'From: <
[email protected]>' . "\r\n";
mail($to, $subject, $body, $headers);
}
?>