获取电子邮件推荐人地址

I have a requirement to know the referrer URL and i am using $_SERVER['HTTP_REFERER'] it works fine for the websites which is referring to my site but it is not showing any url when the link has been clicked from any email inbox.

The short answer is that you can't do this with HTTP_REFERER. Email clients, or anyone else for matter, are not obliged to provide this header with a request.

From php.net:

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

As noted in the comments, you would have to embed tracking information in the link that the user clicks if it is within your control to do so.