"Andy Turner" <an**********@btopenworld.com> wrote in message
news:8d**************************@posting.google.c om...
Hi, I'm trying to setup PHP so it will use a remote SMTP server.
I'm going to sound like a newbie but how? I know you need to alter
php.ini, change SMTP from localhost to the SMTP server and the address
to the correct one but I wondered about passwords? Outlook Express
needs a password so how would I do it.
Unless anyone has any other suggestions/tutorials. Oh and just so you
know my port 25 is blocked by ISP, I think that limits my choices.
Ah forgot to mention, I managed to send a test email from my home
machine to another account using Xmail server but I can't get it to
work from a PHP script.
Thanks in advance,
I've not done what you want to do however Outlook Express wants a password
for your POP3 settings (ie, to read/get your email). SMTP does not need a
username/password though some ISPs have managed to implement POP3 before
SMTP as a workaround for this (roughly meaning that the password you used to
get your email gets you temporary access to the SMTP server). Typically
though ISPs just check that you are on their network to get access to the
SMTP server to reduce the potential from non-customers relaying junk email
through their servers.
If you managed to send a test email from your home machine, you should
provide php.ini the same SMTP settings that you gave to xmail and then
try...
If that doesn't work, then I *believe* (I'm not definite) that you could
create your own SMTP sending function from within PHP. It is a standard
that the mail traffic agent (that handles email in/out of a server) listens
for email on port 25 - If you only want to send email (ie not
listen/receive), you could in theory use any port (thus use sockets in PHP)
to send an email - Thus you could in theory send using your local port 50 if
you wanted, but have your script communicate with remote port 25 on the
machine receiveing the email.
I'd suggest you join the sendmail newsgroup and bounce a few technical
questions at them if you plan on following my last suggested option.