Page 1 of 1

How to configure emails with WAMP easily

Posted: Wed Jun 30, 2010 12:34 am
by Saman
Until we move the website after finishing development to the web hosting server, it is mostly not easy to test the php mail function with WAMP server. Unless your ISP provides you a smtp server, this is not usually possible.

There is one easy solution to test email with WAMP.
  1. Download ArGoSoft Mail Server Freeware
    You can find Version 1.0.0.3 here. This is free for non-commercial use.
    MailServerFreeSetup.zip
    (408.19 KiB) Downloaded 1529 times
  2. Install it.
  3. Go to Users and Domains
  4. Add domain robot.lk (make sure you add your domain here)
  5. Add user admin with password test123 (You may add all the email addresses that you may use for testing)
  6. Make sure php.ini has following settings

    Code: Select all

    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = localhost
    
    ; http://php.net/smtp-port
    smtp_port = 25
    
  7. Write following code on a php file and place it under www root of WAMP

    Code: Select all

    <?php
    $headers = 'From: [email protected]' . "\r\n";    
    mail('[email protected]', 
         'my message subject', 
         'hi, its me',
         $headers);
    ?>
    
  8. Open your browser and run this file
  9. Now we need to configure your mail client with following settings.
    Email Address: [email protected]
    Account type: POP3
    Incoming mail server: localhost
    Outgoing mail server: localhost
    User name: admin
    Password: test123
  10. You can create more users and use those email addresses for testing.
Enjoy!

Re: How to configure emails with WAMP easily

Posted: Wed Aug 18, 2010 12:04 am
by Shanoger
I have a WAMP and trying to send an email using PHP code, i followed the instructions on how to configure the ArGoSoft mail server and these are the details i plugged in the "Users and Domains" tab
In domain: mail.hotmail.com
In user: [email protected] along with my password

then i tried to run the php code (sending email to my self test purpose):
1.
2. <?php
3. $headers = 'From: [email protected]' . "\r\n";
4. mail('[email protected]', 'my message subject', 'hi, its me', $headers);
5. ?>

when i run this using my browser i get
Warning: mail() [function.mail]: SMTP server response: 501 Account does not exist in C:\wamp\www\sendmail.php on line 4

Please help me with this issue...

Re: How to configure emails with WAMP easily

Posted: Wed Aug 18, 2010 2:18 am
by Saman
Under Users and Domains. for domain, add hotmail.com instead of mail.hotmail.com and in user just myemail instead of [email protected].

Hope that helps!

Re: How to configure emails with WAMP easily

Posted: Wed Aug 18, 2010 4:11 pm
by Shanoger
Yes it worked. What i am really trying to do is send a simple mail to my hotmail account using a web page that is running on my local network (wamp), but the PC on which it is running on is connected to the internet. I did the changes as you recommended but i did not find any email in my hotmail account. One more thing if the code worked where did the message go and how can i view it. Thanks in advance...

Re: How to configure emails with WAMP easily

Posted: Wed Aug 18, 2010 4:59 pm
by Neo
You must be able to see the log of the mail server with error messages.
I think the problem is that you are not allowed to send emails outside the list in mail server.

You only can simulate your hotmail account. You need configure a mail client to see the messages. (Thunderbird is a free mail client).

Later when you move it in to your real server, you'll start getting emails on your real hotmail account.

Re: How to configure emails with WAMP easily

Posted: Wed Jan 05, 2011 9:27 am
by Mysoogal
hey neo, you know how to setup newsgroup server ? :mrgreen: hmailserver.com/ is another open source free mail server

Re: How to configure emails with WAMP easily

Posted: Wed Jan 05, 2011 11:21 am
by Neo
hMailServer seems interesting. It's free & open source :)

Re: How to configure emails with WAMP easily

Posted: Thu Jan 06, 2011 12:53 am
by Mysoogal
Neo wrote:hMailServer seems interesting. It's free & open source :)
I've actually tried to setup this server but i couldn't get to the point where i wanted to use sub-domain from noobserver.no-ip.org