Send Emails from PHP on Ubuntu localhost LAMP setup

In this article, I will walk you through the process of configuring your local, Ubuntu based development machine to send emails from within PHP and also from the command line terminal. In a nutshell, you need to install and configure a mail server on your local computer. The mail server that we are going to use is Postfix. So without any further delay, lets get started.

Open up the terminal and, first of all, enter the following command:

It will make available the “mail” command on your terminal and also will install all the programs that it depends on. Our desired mail server Postfix is one of them. During installation, accept the defaults as configuration options of Postfix when asked.

Once the installation is complete, type following command:

Continue reading Send Emails from PHP on Ubuntu localhost LAMP setup

How to get permalink of a post on Facebook?

So, you want to point your friends on facebook to a specific post but you can’t find a way to share that post with them via a button or link in the vicinity of that post. Or, suppose you are taking part in a contest on a company’s facebook page or group and you want to deliver maximum likes or comments on a certain post of you there. Then you would certainly want yourself to be able to give your friends the exact URL of that post. Unfortunately, I don’t find any clearly available option to get such a permalink for any post on facebook. Whenever you get a notification about a new comment or like on a post you are subscribed to and you click on that notification then that is the permalink that I always wished I could get without going through the notifications. Luckily, I found the following hidden trick to get it. The permalink of any post on facebook is hidden under its time stamp. So to get the permalink of any post, click on its time stamp reading “x hours ago”, “x seconds ago”, “a few minutes ago” etc. depending on the time passed since that post has been posted as shown in the following screen shot. Continue reading How to get permalink of a post on Facebook?

How to Manually Upgrade a WordPress Plugin

Since last few versions, WordPress comes with an automatic method of upgrading any installed plugins but this method fails on most free web hosting servers. In such a situation, the need of upgrading a plugin manually via ftp arises. Here is a short tutorial on how to do this.

  1. First of all, go to the plugin’s home page on wordpress .org and do two things there.
  2. Download the latest version of the plugin by clicking on the download link in the upper right corner.
  3. Click on the “Installation” tab.
  4. Read all the content present in this tab carefully to see if the developer of the plugin has given some special instructions about upgrading that particular plugin.
  5. If yes, then just follow those instructions and ignore the next steps of this tutorial.
  6. If the developer has not given any specific instructions then follow the general procedure given below.
  7. Deactivate the plugin by going into the admin panel of your wordpress blog: Dashboard>Plugins
  8. Log on to the ftp server of your website and delete the files of thet plugin present in the /wp-content/plugins/ directory.
  9. Unzip the plugin file you have just downloaded from wordpress.org.
  10. Now upload these new files to the /wp-content/plugins/ directory.
  11. Go to Dashboard>Plugins in the admin panel of your wordpress blog and activate the plugin.

and you are done!!!!

Note:

To stay on safe side, you may want to backup the database of your blog before going through this procedure.

How to select a vertical block of text in Microsoft Word 2007

I was reading a book on Microsoft office Word 2007 when I came across this tip. It was a new piece of information for me so I thought I should share it with you all my friends. The tip is that if you click and drag with your left mouse button while holding down the Alt key on your keyboard, then you can select a vertical block of text in your document. For more explanation, please see the following screenshot.

Vertical Text Selection in MS Word 2007
Vertical Text Selection in MS Word 2007

Isn’t it amazing? However, a little bit of care is required in making such a selection because if you simply Alt+Click a word in MS Word then it launches the Research task pane instead of starting a selection. So, follow the following steps in a sequence to accomplish this task without any hassle:

  1. Press and hold down the Alt key on your keyboard.
  2. Left click in your document where you want the upper left corner of your selection and hold down the mouse button.
  3. Drag your mouse to the point where you want the lower right corner of your selection.
  4. Release the mouse button and then release the Alt key.

You can, however, start the selection from any of the four possible corners and end it on the opposite one.