Anti Spam Tips & Tricks Domains Google Hacks, Cheats & Tips PHP Tips & Tutorials

Remove Gmail via Field and Add mailed-by & signed-by with PHP mail()

PHP mail() is a great function to easily send emails from your website server. If you have ever used it before in action, or are currently using mail() to send out emails from your website or application, chances are you would find Gmail to be very persistent in attaching a ‘via’ field to the from address of your messages to the recipient. If you are on a shared host or have multiple websites on a VPS, the ‘via’ field would be the domain of a whole different website from that of the sending domain, which makes you very uncomfortable.

So how to make the ‘via’ field disappear in Gmail messages sent from your PHP mail() function? How to make the ‘mailed-by‘ field and the ‘signed-by‘ field to be the email-sending domain rather than the server hostname?

How to make Gmail trust your messages sent from the mail() function?

Get rid of Gmail ‘via’ field for PHP mail() messages and make your domain show up in ‘mailed-by’ and ‘signed-by’

Here are what you need to do to make Gmail completely trusts your domain and your PHP mail() messages sent from it.

1. SPF and DKIM

Firstly, you would need to set an SPF record for the domain you are sending emails from and enable DKIM as well. These are primarily for identifying your messages against spam.

2. "From: [email protected]"

Secondly, make sure you are setting the “From: ” header to be an email address on the domain you are sending messages from. Don’t pretend to be someone else. Use “From: [email protected]” if you are sending the messages from, rather than anything else, such as [email protected], or [email protected], or whatever. If you want the recipient to reply to your Gmail email instead of your domain email, use the “Reply-To: ” header. “From: ” must always be the domain email that you are sending the email from.

3. "Return-Path: [email protected]"

Thirdly and most importantly, set the “Return-Path: ” header to be the same domain as that of the “From: ” header. Use the 5th parameter of the mail() function for this:

mail('[email protected]', 'Subject', "Message Body", $headers, '[email protected]')

So the Return-Path of this message would be “[email protected]” (the email address immediately following the -f switch). The $headers parameter should contain all the necessary message headers. Make sure “From: ” is [email protected]

Now Gmail trusts all emails from

After these steps and measures, Gmail should now completely trust your messages from The ‘via‘ field of your messages should be gone and the ‘mailed-by‘ field as well as the ‘signed-by‘ field should be correctly showing up as

Uploaded below is the screenshot of a message sent to my Gmail email from one of my websites (* using the mail() function:

make Gmail trust your email

Both ‘mailed-by‘ and ‘signed-by‘ fields are correctly populated with the sending domain even though it is not the primary site nor hostname of the server that sends the email. The ‘via‘ field is also gone.

This site doesn’t have any SSL certificates installed.

Gmail is by far the best spam catcher of all email services so if they trust you, your emails sent by PHP mail() from should look good in all other email inboxes. Our forum has also got a thread to cover this.

Thanks to Michael Gorven and Laura for the help.

Business and Marketing Google Hacks, Cheats & Tips Make Money Online

Aweber, Mailchimp Alternative – Free Email Autoresponder Subscription

google feedburner - free email subscription serviceI’ve been with Aweber for nearly 2 years and they are good. But I eventually decided that newsletter is not my type of thing – there are people who are making big bucks by building and maintaining a high profile email list, but I’m just not one of them. So I left Aweber and switched all my subscription forms to Feedburner email subscription.

It’s actually pretty good. On top of everything, it’s free and A LOT easier to set up. It’s got anti-spam captcha which Aweber lacks – I contacted Aweber support approximately 1 year ago about this feature and up until now, they still haven’t deployed it. The problem with a popular blog is that there are many spam bots waiting to fill every form on the pages. As a result, my list was filled with fake non-human emails which bloated my number of subscribers, thus monthly fees.

It sucks, though Aweber excels in many other regards such as demographic statistics and CTR, etc. If you’ve got a blog and just want to deliver your fresh posts to the inbox of your readers, namely blog subscription, Feedburner is perfect for you. If you want a little more as what an autoresponder does, Feedburner can somewhat help you in this as well, albeit limited in functionality.

Use Feedburner for Email Subscription

Just sign in your Google account and navigate to and you can start creating your feed right away. In addition to adding a Feedburner custom feed address to your blog, you can also get a email subscription form by “Type your blog or feed address here” and then click “Next”.

It’s all guided and easy to finish. After you have done, go to “Publicize” –> “Email Subscriptions” and click “Activate”, you would then be presented by a HTML code block which is the your blog subscription form that you should put at a prominent place on your blog. Readers can then enter their email addresses to sign up with your newsletter (not newsletter actually, but blog posts notifications). Recommended places to install the email subscription form include: 1) end of the post, 2) top of sidebar, etc.

Use Feedburner as Autoresponder

After you have created your feed at Feedburner, click the feed, and go to “Publicize” –> “Email Subscriptions” –> “Communication Preferences” and there’s a “Confirmation Email Body” that you are free to edit to include any messages or links you would like to show to the subscriber (yet-to-be), such as a thank-you line and the download URL of a ebook you’ve created. After you have made the changes, click “Save” to save them.

Now if anyone subscribes through the Feedburner email subscription form on your blog or website, he or she’d first receive a confirmation message from Feedburner containing things you added just now. It’s exactly like an autoresponder, and it’s free.

Google Hacks, Cheats & Tips – Tips

You can login to at here:

I have been a user of Gmail for almost 6 years. I have some tips on using to share with you that may make your life easier.

You can sign up and get an Gmail account at here: It’s completely free.

Enable keyboard shortcuts

When you are logged in your gmail account, press Shift + / (Shift key and / key, no plus key) and it’ll open up a very nice semi-transparent dialog that shows a full list of all the keyboard shortcuts available to you in Gmail.

Gmail keyboard shortcuts
Gmail keyboard shortcuts

All the shortcuts are disabled by default. Just click the “Enable” link to enable them all. Now you would have all the nice productivity boosters such as:

  1. c” for quick compose
  2. p” for previous message in conversation, and “n” for next message
  3. *” then “u” to select all unread conversations; “Shift + i” to mark as read
  4. Tab” then “Enter” to immediately send the message
  5. #” to move to trash
  6. r” to reply
  7. f” to forward
  8. etc.

How cool is that!

Make messages from a certain sender to skip inbox

If you use vps web hosting, you may be sent too many emails too frequently about the status (security, load, etc.) of your vps box. If these messages are left in the inbox, it’d be a nightmare because there are just too many of them and it makes you finding a certain message much harder and you would be more likely to miss a legitimate / personal message.

So naturally, we would want those messages to be received and dropped in another custom inbox rather than the main one. For example, all these messages are from [email protected]:

  1. Click the top settings cog in the top right corner –>
  2. Mail settings –>
  3. Filters –>
  4. Create a new filter –>
  5. From: [email protected] –>
  6. Next Step
  7. Check “Skip the Inbox (Archive it)” and check “Apply the label: New label…”and create a new label (such as “Alerts”) which will be a custom inbox that will be storing all messages coming from [email protected] –>
  8. Create Filter (done)

Now all messages coming from [email protected] will be automatically stored in the custom inbox “Alerts” rather than the main inbox.

There are a lot more you can do with filters that automatically processes or takes care of messages by certain criteria.

Use search operators to quickly find messages – by sender, recipient, subject, attachment, label, etc.

Just like with the web search engine, you can use search operators with as well. Some of my most frequently used operators with Gmail are:

  • from:[email protected] —- Find all messages / communications from [email protected]
  • to:[email protected] —- Find all messages you sent to [email protected]
  • has:attachment subject:samples —- Find all messages that have attachment and have ‘samples’ in the subject
  • filename:office.jpg label:photos is:starred —- Find all starred messages with label ‘photos’ that have the file office.jpg attached

Get to know more operators and examples at here: They will prove to be very handy.

Alias email addresses – you have unlimited sub-emails!

If your email address is [email protected], messages delivered to:

Are all directed to [email protected]. With one Gmail account, you have a literally unlimited number of sub-emails.

With filters, this would come out even more powerful because you can set up filters to automatically move, star, forward or apply labels to messages from a certain alias address.

Pre-saved messages / responses to be re-used by a click

If you find yourself typing the same (or almost the same) messages over and over again, you may want to save the message as Canned Responses which is an experimental module that you can turn on for your Gmail account in the Labs (Mail settings -> Labs).

Combining it with filters, you will have a highly automated email system that messages of certain criteria (such as coming from a specific sender or containing an arbitrary phrase) will be automatically replied to with one of your pre-saved responses.

Accessing multiple email accounts (such as from and within your Gmail account

Other than Gmail itself, you can also set up 3rd party email services so that you can access them all from within Gmail. This would definitely make things simpler and save time if you have quite a few emails from different providers to check everyday. All you need is entering the POP3 server details and giving Gmail the permission to download the messages. Follow this guide for how to set it up, it’s quite easy:

Shift-click to instantly select multiple messages

It’s just like what you would do in Windows. If there is a large series of multiple messages that you want selected, just select the first one and then hold Shift key to click the last. So simple and so intuitive.

Google Hacks, Cheats & Tips Hosting Tips & Deals

How to slow down the frequency Googlebot (search engine crawler) visits your site?

Googlebot is the indexing program of Google that visits your site to fetch the content to determine your search engine rankings. With a popular website, tens of thousands of pages can be a problem in that Googlebot may visit more than you want because it’s expending your precious bandwidth and even crashing your server. Every crawler bot visit is no different than a user one and your site has to perform all necessary actions and logics to render the web page to the search engine crawler bot such as Googlebot including searching through a database with potentially millions of records which could take a while. Imagine, the Googlebot pays 300,000 visits a month to your site. That’d be a substantial expenditure in bandwidth and server computing resources.

For example, one of my sites have experienced 338,768 hits from just one IP of Googlebot last month. I have no idea why Googlebot is so fanatic about this site because it rarely have any backlinks and Google is neither sending any significant traffic. But one thing is for sure, that this site is creating some serious trouble on my hosting bills because of Gooblebot. While we cannot totally deny Googlebot from visiting our websites, we can do something to slow it down a little bit.

There are 2 things you can do:

  1. Visit Google Webmaster Central:, sign in to webmaster tools, (add if you haven’t, and) select the site in question, select Site configuration, select Settings, select Set custom crawl rate of Crawl rate and adjust the scroll bar to slow the crawl rate down.
  2. Create robots.txt and place it at the root of your website, put these 2 lines inside:
    User-agent: *
    Crawl-delay: 20

    Wherein the value of Crawl-delay is the time in seconds that the search engine bot should wait between requests. 20 is a very slow option. Most search engines such as Google wait less than 1 second to fetch a moderately popular website.

Some argue that Google never respects the Crawl-delay option of robots.txt and the only way to decrease the visiting frequency of Googlebot is to adjust the scroll bar in Google Webmaster Central.

Content / SEO Tips & Tutorials Google Hacks, Cheats & Tips

Use robots.txt Disallow directive to forbid spiders and search engine robots

Just like .htaccess, robots.txt resides at the document root of your domain. It’s a text configuration file containing directives or rules any well behaved web spiders or search engine robots should respect. While you can use .htaccess to forcibly prohibit any visits (including those of human visitors) to a certain part of your site, robots.txt just deals with automated web page spiders such as googlebot.

To forbid any robot spiders to access and index /includes/ and /search/ directories of your site, simply write a robots.txt file and put in the following rules:

User-agent: *
Disallow: /includes/
Disallow: /search/

The asterisk * stands for any robot. By these rules, all robot spiders should not access nor index /includes/ and /search/. This is a good way to protect sensitive data and stop search engines from indexing certain part of your site.

Similarly, you can write rules targeted at a specific search engine:

  1. GoogleBot – Google
  2. Slurp – Yahoo
  3. MSNBot – Bing

(Note that these search engine providers may very probably have more than one bots, the listed bots are just the most common ones at present.)

For example, to prohibit Google from accessing and indexing /ihategoogle and any web documents under it, use rule:

User-agent: GoogleBot
Disallow: /ihategoogle/

There is no Allow directive

Therefore, to allow a spider to access your site, say nothing or:

User-agent: GoogleBot

To allow a single bot such as GoogleBot to have the only privilege to access your entire site:

User-agent: GoogleBot

User-agent: *
Disallow: /
Computer & Internet Literacy Google Hacks, Cheats & Tips

Ask Google for Astronomical Unit, proton mass, planet or sun’s mass and radius

To get the exact Astronomical Unit in kilometers:

astronomical unit
1 Astronomical Unit = 149 598 000 kilometers

To get Google to return the mass of proton:

mass of a proton
proton mass = 1.67262158 × 10-27 kilograms

To get the mass of any planet in solar system from Google, search by:


Will yield the mass of our planet Earth:

mass of Earth = 5.9742 × 1024 kilograms



And you will get the mass of Mars

mass of Mars = 6.4191 × 1023 kilograms

To get the radius of Uranus:

radius of Uranus = 25 559 kilometers

The same approach to get the radius of other planets hold true. Also you can get the radius of the Sun:

radius of the sun = 695 500 kilometers

Or the mass of the Sun:

mass of the sun = 1.98892 × 1030 kilograms
Computer & Internet Literacy Google Hacks, Cheats & Tips

Google to get the Light Speed or Gravitational Constant

Want a reference to the speed of light in vacuum with a meter / second precision? Just ask Google:


And it returns the speed of light in m/s:

the speed of light = 299 792 458 m / s

To get the Gravitational Constant, simply type ‘G’:


And it returns:

gravitational constant = 6.67300 × 10-11 m3 kg-1 s-2

Computer & Internet Literacy Google Hacks, Cheats & Tips

Google: Restrict matching results by searching only the anchor text, page title, page URL, page text or filetype

For a normal search, Google decides the best results and the web page order by a variety of matching criteria such as in anchor text, page title, page URL. Sometimes, however, you need Google just to search certain part of the entire spectrum of comparison candidate.

For example, to search with the matching phrase just in the URL of the web page:

inurl:google sucks

To search for results pages with ‘google sucks’ in the title element:

intitle:google sucks

You can also make this match more strict and an exact one by:

intitle:"google sucks"

To search web pages / websites that are called ‘google sucks’ from other web pages:

inanchor:google sucks

That is, if site A links to site B with the anchor text ‘google sucks’, the linked page on site B will emerge in the results.

You can also designate Google to only return results with the specified keywords or phrases in the page content or page text:

intext:google sucks

Each of the above search phrase operator: inanchor, inurl, intitle and intext can all be prepended by ‘all’, resulting in: allinanchor, allinurl, allintitle and allintext that prescribes all the words in the provided phrase must be in that part of the page or it won’t be a match.

To search a specific type of files for the matching results, for example, PDF files, use:

google sucks filetype:pdf

And Google will only return those PDF files that it finds the phrase ‘google sucks’ in.

Computer & Internet Literacy Google Hacks, Cheats & Tips

Google: Find out the population of a country, state or city – Google Public Data Search

Google identifies data in a lot of fields across the web and population is one of them. To get the local population of a city, a state or a nation, simply type in Google search:

population new york population paris population shanghai population CA


population california population japan

What can be more handy. Google has all the historical population data and figures across the entire US and you can view them in a comparison chart at here.

Computer & Internet Literacy Google Hacks, Cheats & Tips

Google: Search only a specific site

Sometimes you may only want to pull information and searching results from a specific sites such as, just use the site clause in the searching phrase.

For example, to search ‘mortgage loans’ only from the website

mortgage loans

Google will then only return those web results from the site that’s about ‘mortgage loans’.