|
Posted by kenoli on 01/04/07 15:12
Thanks -- There was no line for "MAILSERVER" so I added one placing
"=-YES-"
It still isn't working. I tried implementing:
telnet localhost 25
from the terminal. This was suggested at the Postfix web site to test
sendmail. I got this response:
~$ telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
Any feedback on what is happening?
Does Apple actually supply a mailserver locally (using "sendmail",
Apache???) or does it use one of the remote mailservers I have set in
Apple:MAIL
There is a way to set the path to sendmail in php.ini which is not
normally set. "sendmail" is present on the computer. I tried setting
the path and that had no effect.
I tried connecting to the Postfix telnet host using:
telnet cutedgesystems.com 25
and was successfully connected.
Here is the php code that is sending the email:
// Send the email.
$body = "Thank you for registering at the User Registration site.
To activate your account, please click on this link:\n\n";
$body .= "http://localhost/~kenolioleari/ . . .;
mail($_POST['email'], 'Registration Confirmation', $body, 'From:
[my email address]');
My remote SMTP server uses port 26. If I change php.ini to port 26 an
use my email as the outgoing email address, it does send an email. If
I leave it at port 25 and send an email to another address, it does not
work.
!!!!!!???????
--Kenoli
Koncept wrote:
> In article <1167596914.391884.64770@v33g2000cwv.googlegroups.com>,
> kenoli <kenoli@igc.org> wrote:
>
> > I am experiencing a strange phenomenon. I am only able to send mail to
> > an email address set up in my Apple "Mail" software as an outgoing
> > address associated with an outgoing smtp server account. Apple selects
> > which port and outgoing smtp server configuration it is going to use
> > based on the sending email.
> >
> > I would expect that I would have to send from this email address, but,
> > in addition, the system seems to require that the To: header has to be
> > the same as the From: header.
> >
> > I'm pretty sure this is what is going on as I have several outgoing
> > smtp accounts set up in Mail, each using different outgoing mail ports.
> > By changing the setting in php.ini to the various ports, the system
> > will only allow me to send to which ever email address is associated
> > with the outgoing account and email address using that port.
> >
> > Anyone know anything about how Apple handles this? The emails I am
> > sending are activation emails for people registering. With things they
> > way they are, I am the only one who can register.
> >
> > --Kenoli
> >
>
> Hey Kenoli:
>
> Mail.app does not have much to do with how PHP sends mail through its
> mail method. You probably just need to enable the built-in Postfix
> server.
>
> 1) Open Terminal.app ( Applications > Utilities > Terminal.app )
>
> 2) Type "sudo nano /etc/hostconfig"
>
> 3) Enter your admin password when prompted.
>
> 4) Modify the line:
>
> MAILSERVER=-NO-
> to:
> MAILSERVER=-YES-
>
> Now hit control + x
>
> 5) You should see a prompt like this:
> Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
>
> 6) Hit "y" and return.
>
> 7) Reboot your machine. Mailserver should now be running.
>
> 8) Test the mail() in php using whatever to and from headers you wish.
> Things should work fine. You shouldn't have to alter anything in
> php.ini for this situation.
>
> Some extra material:
> ---------------
> You can configure things a lot more using this app:
> http://www.cutedgesystems.com/software/PostfixEnabler/
>
> Best.
>
> --
> Koncept <<
> "The snake that cannot shed its skin perishes. So do the spirits who are
> prevented from changing their opinions; they cease to be a spirit." -Nietzsche
Navigation:
[Reply to this message]
|