Automatic Email is Easy!

Friday, March 30th, 2012

Something which has been worrying me with the development of pjs.cat was how do we automatically send users email? When a new user signs up, I may want to send an activation email. When a user loses their password and they need to reset it, we’ve got to send out an email.

But every time I tried sending one, it didn’t work.

I decided to put it to the back of my mind, and sort it out later. I had a hunch, and that hunch was that the emails weren’t sending because the local server on my computer wasn’t fully set up.

Well today I uploaded this really really simple PHP script to my new web server:

And I was rewarded with this message:

It worked! Now I know, it just seems so easy.

For me the magical world of email just got reduced to a few simple lines of code.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: