Setting up a mail server...

Discussion in 'Web Design and Development' started by Soulstorm, Dec 22, 2008.

  1. Soulstorm macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #1
    I have a friend who is signed up in a web hosting company, and he has his site uploaded and running for a couple of years...

    However, he recently decided to upgrade his site, and he had me design a contact form. I designed it, and it works OK in my server, but I can't seem to be able to run it from his server. I have reasons to believe that the company he is subscribed hasn't set up a mail server for him, in order to send mails using PHP.

    Can anyone tell me how can I do that? What do I need to know in order to manually set up a mail server in order to use PHP to send mails?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    How are you attempting to send email (sendmail, specific PHP functions, any SMTP)? There doesn't need to be a mail server.
     
  3. Soulstorm thread starter macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #3
    I am using the mail() function of PHP. Shouldn't this work?

    Actually, I have designed the communication form using rapidweaver, but I have also tried with PHP mail(), to no effect.
     
  4. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #4
    Angelwatt asked you for, "specific PHP functions" - what PHP code did you use? What error was returned? Link to a page so we can test?

    I'll backup what Angelwatt said - you do not need a mail server simply to send outbound mail via sendmail on a typical web server. Sendmail usually SMTP relays to the domain controller run by your webhost or to a mail server within their domain or their ISP's as the gateway to the Internet.

    If you want to check how PHP is setup to handle mail, i.e. some webhosts out there might have turned it off for security reasons or plain old stupidity by accident, call phpinfo() in a test.php script and look at the mail section. If you're not sure, copy/paste relevant settings here in addition to your code you used to send mail so we can get to the bottom of this.

    -jim
     
  5. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #5
    Actually, at the time, I was just wondering if he was using the mail function, but I would have likely followed up with some of the questions you did, but I should have included them right away to move the discussion forward more quickly.
     

Share This Page