1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How do I send mail in PHP

Discussion in 'Software Development' started by Brooook, Oct 13, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. Brooook

    Brooook Thread Starter

    Joined:
    Oct 27, 2002
    Messages:
    164
    I have PHP / MySQL / Apache on my laptop to learn programming. I have XP and use OE6. How do I get the mail() function to send mail with PHP? The PHP manual talks about SMTP ports etc and changing php.ini but I am ignorant as to what a SMTP port is and can't find that line in php.ini. I only see SMTP = localhost and sendmail_from = [email protected].

    Please does anyone know how to send mail from PHP?
     
  2. bassetman

    bassetman Moderator (deceased) - Gone but never forgotten

    Joined:
    Jun 7, 2001
    Messages:
    47,973
  3. Brooook

    Brooook Thread Starter

    Joined:
    Oct 27, 2002
    Messages:
    164
    I got all excited and thought you had the answer, bassetman. You got the same problem???
     
  4. deuce868

    deuce868

    Joined:
    Nov 2, 2000
    Messages:
    637
    the problem is that you have to have a mail server set up to run the mail through. XP does not by default have a mail server for you to use. You can look at downloading several small smtp servers or you can see about trying it out on a linux server with it already set up.

    I have not tried to get a mail server for my XP side. I just test out the mail code on the production server instead.
     
  5. bassetman

    bassetman Moderator (deceased) - Gone but never forgotten

    Joined:
    Jun 7, 2001
    Messages:
    47,973
    Broook, no I don't have the problem I was just trying to prevent your message from scrolling off the board! ;)
     
  6. Brooook

    Brooook Thread Starter

    Joined:
    Oct 27, 2002
    Messages:
    164
    So I can't redirect mail through OE6? Anyone know a good smtp server I can download for XP?

    Thanks for bumping, bassetman. Love your quote. I have used it a lot since reading a previous post from you some time ago!
     
  7. Brooook

    Brooook Thread Starter

    Joined:
    Oct 27, 2002
    Messages:
    164
    I talked to my ISP and a techy (who doesn't use PHP) advised that I could connect to their remote SMTP server instead of installing my own. How do I script that in PHP? Is this a viable option? The addy they gave me is smtp.ihug.co.nz
     
  8. Brooook

    Brooook Thread Starter

    Joined:
    Oct 27, 2002
    Messages:
    164
    I put the addy smtp.ihug.co.nz into my php.ini file instead of localhost AND IT WORKED!!! My php scripted login program sent a new password to me! YAY

    Sometimes it helps to talk it over on this forum.

    Thanks for all your help. It won't be the last time you hear from me.
     
  9. bassetman

    bassetman Moderator (deceased) - Gone but never forgotten

    Joined:
    Jun 7, 2001
    Messages:
    47,973
    Good for you, I didn't see this again until you got it resolved! :cool:

    Glad to hear you will be back!
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/171721

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice