how to get localhost (xampp) to send emails?

From C++ to PHP, debugging to webhosting; help and discussion about writing your latest program to running your website. NOT for help when your PC won't work.

Announcements Posted on
Sign in to Reply
  1. purplefrog's Avatar
    • PS Helper
    • Overlord in Training
    • Location: UCL
    • Posts: 2,610
    how to get localhost (xampp) to send emails?
    Hi

    I'm trying to test out a contact form I made but have no idea how to get my localhost to actually send emails.
    I've got xampp installed under default settings and have not changed any of the configuration files.

    I have gmail and hotmail accounts that I'm willing to use for testing my contact form.
  2. estel's Avatar
    • TSR Idol
    • Location: Bristol
    • Posts: 9,352
    Re: how to get localhost (xampp) to send emails?
    Doesn't xampp already come with mail() and sendmail.exe ?
  3. purplefrog's Avatar
    • PS Helper
    • Overlord in Training
    • Location: UCL
    • Posts: 2,610
    Re: how to get localhost (xampp) to send emails?
    (Original post by estel)
    Doesn't xampp already come with mail() and sendmail.exe ?
    It does, but I don't know what settings to apply.
    I've tried editing the php.ini and sendmail.ini files by following various tutorials online, but it doesn't seem to work. I'm not sure what I'm doing wrong as I'm only changing three or four attributes in total.
    I'm a complete PHP newbie btw. Only just started to venture into it for this contact form purposes. I normally deal with HTML/CSS only (straightforward stuff )
  4. Dez's Avatar
    • TSR Group Staff
    • The square root of rope is string.
    • Location: The South
    • Posts: 8,221
    Re: how to get localhost (xampp) to send emails?
    This shouldn't be too tough, you just need to edit the SMTP settings in your php.ini. Also make sure you can actually connect to the SMTP server in question, as some ISPs will block sending mail to arbitrary ISPs (BT does this from memory).
  5. purplefrog's Avatar
    • PS Helper
    • Overlord in Training
    • Location: UCL
    • Posts: 2,610
    Re: how to get localhost (xampp) to send emails?
    (Original post by Dez)
    This shouldn't be too tough, you just need to edit the SMTP settings in your php.ini. Also make sure you can actually connect to the SMTP server in question, as some ISPs will block sending mail to arbitrary ISPs (BT does this from memory).
    I haven't bought a web-hosting space yet so my project at the moment is completely offline. Is there any way to simulate it just locally?
  6. Dez's Avatar
    • TSR Group Staff
    • The square root of rope is string.
    • Location: The South
    • Posts: 8,221
    Re: how to get localhost (xampp) to send emails?
    (Original post by purplefrog)
    I haven't bought a web-hosting space yet so my project at the moment is completely offline. Is there any way to simulate it just locally?
    Find the SMTP settings for Google or Hotmail or whatever you're using and plug them in. But check them first using a desktop email client (e.g. Outlook, Thunderbird) to see if you can actually connect. If not, you may need to find out what your ISP's SMTP server details are instead.
Sign in to Reply
Share this discussion:  
Useful resources
Article updates
Moderators

We have a brilliant team of more than 60 volunteers looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Reputation gems:
The Reputation gems seen here indicate how well reputed the user is, red gem indicate negative reputation and green indicates a good rep.
Post rating score:
These scores show if a post has been positively or negatively rated by our members.