Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mail server for PHP

    Is it possible to use my ISP's mail server to send outgoing email through PHP or do I need an actual mail server installed on the system? I use my home PC for PHP development but I don't have a mail server installed on the machine itself as I just use my ISP's incoming/outgoing mail servers for e-mail.

    EDIT: Using Windows XP Pro if that matters.
    Last edited by Eiolon; 12-28-2006 at 05:51 PM.

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    Since you have PHP installed on Windows XP, it is actually very easy to use PHP to send emails.

    Note: I have not tested the following configurations on IIS. Personally, I use Apache2 and works like a charm.

    You can do this in two ways.
    1- Open php.ini in your favourite editor and edit the following line (around 602)

    Code:
    SMTP = localhost
    You should add your SMTP server there. Personally, I use my ISP outgoing mail server and works like a charm.

    2- Add the following code in the page you wish to use to send emails.

    PHP Code:
    ini_set('SMTP','YOUR_SMTP_HERE'); 
    Note: replace YOUR_SMTP_HERE with your ISP outgoing mail server.

    If you are using outlook, then just use the outgoing smtp server and that should get it working.

    Good luck.
    Ess


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •