remote SMTP server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy Turner

    remote SMTP server

    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,
  • Randell D.

    #2
    Re: remote SMTP server


    "Andy Turner" <andyj_turner@b topenworld.com> wrote in message
    news:8dec6baa.0 309190221.1f504 ae3@posting.goo gle.com...[color=blue]
    > 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,[/color]

    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.


    Comment

    • Nikolai Chuvakhin

      #3
      Re: remote SMTP server

      andyj_turner@bt openworld.com (Andy Turner) wrote in message
      news:<8dec6baa. 0309190221.1f50 4ae3@posting.go ogle.com>...[color=blue]
      >
      > I'm trying to setup PHP so it will use a remote SMTP server.[/color]

      Get yourself a copy of phpMailer:


      [color=blue]
      > I'm going to sound like a newbie but how? I know you need to alter
      > php.ini[/color]

      With phpMailer, there's no need to modify anything, as you will not
      be using (and, hence, needing) mail() function nor imap_*() functions.

      Cheers,
      NC

      Comment

      • KAH

        #4
        Re: remote SMTP server

        "Randell D." <you.can.email. me.at.randelld@ yahoo.com> wrote in
        news:qXFab.1850 47$la.3709940@n ews1.calgary.sh aw.ca:
        [color=blue]
        > 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.[/color]

        If your ISP uses POP3 auth to give you SMTP access, change ISP immediately.
        There is an SMTP service extension detailing SMTP authentication [1], which
        all sane mail admins should use. This is the best solution if you can't be
        sure of having all users coming from a specific network.

        I don't think the mail() function has support for this, although I guess
        sendmail might have and that you just have to give it the right arguments.
        See the sendmail docs for that.

        KAH
        [1]: http://ftp.isi.edu/in-notes/rfc2554.txt

        Comment

        Working...