Skip to content →

Tag: email

How to set up email with WAMP

Development sites and production sites; host and local servers

When I develop a new website, say for my blog, I set up a mock version on my laptop. In techy-speak, I am using a “development site” on a “server” on “local host”.  When the website is ready, I move it to my hosting service (in my case Dreamhost in the US). That is my “production site” and the website will thereafter physically reside on their servers and they will be the host.

Set up WAMP

I use a standard laptop to develop my websites. This one has Windows 7. My last one had Windows XP, and so on.  To set up my local server, I download WAMP.  As I only download WAMP when I have a new computer, I follow the instructions on LifeHacker, which are very clear.

Basically, I arrive at an arrangement where I have

  • A directory in C: called C:wamp
  • A program under C:ProgramFiles called WampServer where I can fire up WAMP (I leave WAMP off when I am not using it)
  • Within C:wamp is C:wampwww where my websites are stored
  • And within WampServer is access to localhost, PHP and MySQL.  PHP runs the server and MySQL sets up databases to store blogs.

It is all rather baffling at first but set aside a quiet Sunday afternoon and work methodically.  You will manage fine.

Set up email for a development site on WAMP

This post is about setting up email to work with a development site. I never bothered to set it up for my WordPress mockups because I already knew how WordPress worked and I could fast forward in my mind to what the production site would look like.  But yesterday, I downloaded Elgg to develop a social network and I really wanted to test the email functionality.  So this is how I set up email functionality for WAMP.

The basic principles are that I downloaded an email service called sendmail and I edited my PHP.ini file.  Both are easy and I will go into the details just now. This paragraph is to record an important point.  The set up changed the default email in the PHP.ini file. This is why that matters.  It is highly probable that each development site has a different email address.  The solution in this email assumes that the same email address is used with every site.  Either use the same email address for all your development sites or remember to change the sendmail.ini each time you change sites (and possibly the php.ini as well).  Whatever, don’t be surprised if something breaks. This could be the cause.

How to set up email for WAMP in three steps

#1 Download sendmail into a the c:wampbinsendmail

You will know you are in the right place because  bin has directories for PHP and MySQL

#2 Edit sendmail.ini in a text editor

I linked to a gmail account so at the date of writing (April 2012), look for these lines and fix them accordingly




NB I am using an email address that works with Google Apps so the in my email address actually read


#3 Edit your php.ini file

On my version of Windows 7, I start my WampServer by finding it on the All Programs list. Then I look on the bottom tool bar for an upward arrow.  I activate WAMP with the big W.  Once it turns green, I can find everything that comes with WAMP.

I select PHP and open PHP.ini in a text editor.  I find “mail function” and I will now edit it out all mail settings AND add a path directing WAMP to the sendmail that I just set up.  These are the important lines.

[mail function]

; For Win32 only.


; SMTP =


; smtp_port = 25


; For Win32 only.


; sendmail_from = an email address that is already there


; For Unix only.  You may supply arguments as well (default: “sendmail -t -i”).


sendmail_path = C:wampbinsendmailsendmail.exe -t


; Force the addition of the specified parameters to be passed as extra parameters

; to the sendmail binary. These parameters will always replace the value of

; the 5th parameter to mail(), even in safe mode.

; mail.force_extra_parameters =

In short, make sure all the lines but one start with a semi-colon and copy the path line above.


And restart your server by pressing the arrow on the tool bar, selecting W, and “restart all services”.


Now test your email service. You should be able to send an email from Elgg (or any other service). So try it – send an email from your development website (the email address does match what you put in sendmail.ini, right?) to another of your email addresses and go to see it it arrives within seconds.

Done!  You have set up email functionality in WAMP.

Make your own notes so you can do it again. And importantly, recall what you have done when you move to a production site or start another development site.  Write your own notes!  It only takes a few minutes!



Oops! Should have bcc’d that email!

My first email newsletter  .   .  .

Last weekend, I set up the first email update for the members of Olney100, the community website that we run on the Ning platform for the town of Olney in England.

The broadcast facility in Ning doesn’t allow formatting, so I downloaded the membership list into a CSV file and imported it into my email.  After a hard afternoon designing the newsletter and trying to keep it short, useful and readable in 10 seconds, rather tired, I sent it out.  Oops! I put the group name into CC and not Bcc.

Data transmitted in error

Only one person wrote to complained, and one of course, was sufficient to alert me to the error of my ways.   My apologies.

Interestingly, one of the members also made this mistake this week in his business.  In his case, he had received an inquiry and he replied to everyone on his mailing list.  As it happened, the person making the inquiry was a competitor who was delighted to receive a list of qualified leads and promptly wrote to them all offering his services.

My young friend received a lot more complaints than U – 5% of his list.  His customers are generally younger than mine, and a lot more aware of the norms and law of the internet.

Dealing with data misuse

This is the way he responded.

1  He apologized immediately and unreservedly to his customers.

2  He checked the Data Protection Act and copied and pasted relevant portions into a ‘cease and desist’ notice which he sent to his competitor making it clear that is is an offense to make use of electronic data for purposes other than it was intended.

3  Then he thought some more and recalled that the impersonation of a consumer by a business is also an offense.

Internet laws are much stricter than people realize.  And so they should be.  The rules for driving a car are tighter than the rules for walking on the pavement.

How many dodgy firms will be called to account through internet law?

It strikes me that there may be a parallel between internet law and tax law.

Very few people know that crooks are required to pay tax on their ill-gotten gains and that equally, tax officials are bound over not to report our nefarious dealings to the police or any other authority!

Governments are generally quite zealous about collecting taxes and do inventive things, like audit drivers of flashy cars, the keepers of yachts and persons whose conspicuous consumption exceeds their declared income.   This leads to crooks, like Al Capone, being busted not for crookery, but for tax evasion.

It strikes me that firms who sail close to the line and entice people to purchase their services with false claims might similarly find themselves, not being busted for fraud, but being busted for trying same wide-boy behaviour on the internet.

Gen Y know the rules and will enforce them!

Sharp operators need to watch out.  Gen Y are quite savvy and know the rules!

Have you seen any dodgy activity around electronic data recently?

Enhanced by Zemanta
Leave a Comment