Problem setting up mail server

Reply

Join Date: Nov 2006
Posts: 21
Reputation: hkBattousai is an unknown quantity at this point 
Solved Threads: 0
hkBattousai's Avatar
hkBattousai hkBattousai is offline Offline
Newbie Poster

Problem setting up mail server

 
0
  #1
Feb 5th, 2007
Hello,

I want to embed a mail server on my computer. For that purpose I've installed MDaemon v9.5.3 on my computer. Now what else do I have to do in order to send/recieve mail from different people? Should I have to change configuration settings in "PHP.ini" and/or "httpd.conf"?

I always get an error like this whenever I use mail() function :
Warning: mail() [function.mail]: SMTP server response: 550 <RecipientAddress@domain.com>, Recipient unknown in C:\Prog\SERVER\DocumentRoot\SendMail\Send.php on line 69
The code on line 69 is mail() function of PHP.

My system :
WinXP
Apache 2.0
PHP 5
MDaemon 9.5
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 232
Reputation: Rhyan is an unknown quantity at this point 
Solved Threads: 24
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Posting Whiz in Training

Re: Problem setting up mail server

 
1
  #2
Feb 12th, 2007
If you are using WinXP pro, you should think of installing IIS with SMTP services on. IIS is MS native web server, including HTTP, FTP and SMTP server. Still you can install only the SMTP server.

Then, set your php.ini to send mail via the localhost. If any additional setup is needed to be performed consult the php manual.

Then your mail function should work normally.

This is about sending e-mails. In order to receive mails, though, you should have your computer's IP registered as a domain in order other people's mail servers to find it.

If you have e real internet IP people may be able to send you mails like this:
e.g. your ip is 1.2.3.4
people could mail you to you@1.2.3.4
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 21
Reputation: hkBattousai is an unknown quantity at this point 
Solved Threads: 0
hkBattousai's Avatar
hkBattousai hkBattousai is offline Offline
Newbie Poster

Re: Problem setting up mail server

 
0
  #3
Feb 12th, 2007
  1. [mail function]
  2. ; For Win32 only.
  3. SMTP = localhost
  4. smtp_port = 25
  5.  
  6. ; For Win32 only.
  7. sendmail_from = me@example.com
  8.  
  9. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  10. ;sendmail_path =
  11.  
  12. ; Force the addition of the specified parameters to be passed as extra parameters
  13. ; to the sendmail binary. These parameters will always replace the value of
  14. ; the 5th parameter to mail(), even in safe mode.
  15. ;mail.force_extra_parameters =
This is a block from PHP.ini file.
Are the settings which I must change any of these?

And...
I'm using WinXP Home Edition.
This is the relevant Apache settings in httpd.conf file :
  1. ServerName www.localhost.com:80
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 232
Reputation: Rhyan is an unknown quantity at this point 
Solved Threads: 24
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Posting Whiz in Training

Re: Problem setting up mail server

 
0
  #4
Feb 12th, 2007
Originally Posted by hkBattousai View Post
  1. [mail function]
  2. ; For Win32 only.
  3. SMTP = localhost
  4. smtp_port = 25
  5.  
  6. ; For Win32 only.
  7. sendmail_from = me@example.com
  8.  
  9. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  10. ;sendmail_path =
  11.  
  12. ; Force the addition of the specified parameters to be passed as extra parameters
  13. ; to the sendmail binary. These parameters will always replace the value of
  14. ; the 5th parameter to mail(), even in safe mode.
  15. ;mail.force_extra_parameters =
This is a block from PHP.ini file.
Are the settings which I must change any of these?

And...
I'm using WinXP Home Edition.
This is the relevant Apache settings in httpd.conf file :
  1. ServerName www.localhost.com:80
Yes, these are the settings, however IIS is not available on home edition. You may look over the internet if you can download and install a stand-alone IIS server on WinXP Home. Meantime, here is a simple phpclass that substitutes the php mail functions. All it needs is a valid smtp server that you normally can login and send mail from.

http://phpmailer.sourceforge.net/

You can use your own e-mail if you want for testing purposes.
A simple tutorial is available on the page I have sent to you.

Basicly, you have to require the script from your mailing form, and it will do the rest for you. You can set it on any server as part of your website. It does not need installation - it is as simple as creating your own mailing script.

Regarding your mail server, or whatever the program you have installed. If you cannot send mail, maybe you have not configured a DNS server. You can use your internet providers DNS servers to resolve e-mail hosts in order to send mail from your program.

Check the program's manual for instructions how to set the DNS server addresses for sending mail.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC