Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
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?
 
How are you attempting to send email (sendmail, specific PHP functions, any SMTP)? There doesn't need to be a mail server.
 
How are you attempting to send email (sendmail, specific PHP functions, any SMTP)? There doesn't need to be a mail server.

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.
 
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
 
Angelwatt asked you for, "specific PHP functions"

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.