Posts Tagged ‘gmail’

Getting started on Twitter

January 2, 2018 Leave a comment

You have a site and you want to create a Twitter site for it too where you want to send posts, probably in an automatic way.

If you have a gmail account, you can use it to create several Twitter accounts. The trick is to make the e-mail addresses different with a dot. Example: and . If you send an e-mail to these addresses, they’ll arrive in the same mailbox, though Twitter treats them as two different addresses.

Then, follow the steps at to register your app.

Sample Python code
Here is a simple example to post a tweet:

#!/usr/bin/env python3

import config as cfg
import tweepy

def get_api(cfg):
    d = cfg.twitter_keys
    auth = tweepy.OAuthHandler(d['consumer_key'], d['consumer_secret'])
    auth.set_access_token(d['access_token'], d['access_token_secret'])
    return tweepy.API(auth)

def main():
    api = get_api(cfg)
    tweet = "just a test"
    status = api.update_status(status=tweet)    # update_status -> send a tweet

if __name__ == "__main__":
Categories: python, web Tags: , , , ,

Gmail users have an extra email address

July 12, 2014 Leave a comment

TIL that if you have a Gmail address (e.g., then you also have a address. Give it a try. Send something to your address, and it will be delivered to you inbox.

This tip is from here.

Categories: google Tags: ,

Android got damn slow

February 6, 2013 2 comments

My Android phone got very slow. It started about a week ago. When I visit Gmail, for instance, I have to wait minutes until my new messages appear. If they appear at all… Often, messages are not updated. I click on “refresh”, I wait 2 minutes, but I still get the old messages. What da hell?

In this forum thread I found the following tip:

EDIT: I found the solution… Go into the Market and install AdFree. Update the host file and reboot to clear DNS, everything back to normal. Myn’s is preloaded with the Adfree host file and it became outdated.

AdFree requires root privileges. Doing the rooting process and installing AdFree, my phone got much faster :) I need a few more days/weeks to test it but it looks promising.

Categories: android Tags: ,

Locate big emails in Gmail

November 16, 2012 2 comments

Gmail supports an undocumented ‘size’ search operator that will let you quickly find all the big emails in the mailbox whose size exceeds a particular threshold. The search syntax is:

size:[size in bytes]

To give a real example, a Gmail search query like ‘size:5242880’ will list all big emails whose size is 5 MB or greater while ‘size:10485760’ list messages that are bigger than 10 MB.

From here.

Categories: google Tags: , ,

Check Why your Email was Delivered Late

October 6, 2012 Leave a comment

Amit Agarwal wrote a great post on how to analyze why your email was delivered late.

In short:

  • get the original email message (“show original”)
  • copy the whole header and insert it in this application: MessageHeader Google Apps Toolbox
  • it will analyze and show you where the delay occurred
Categories: google Tags: , ,

August 2, 2012 Leave a comment
Categories: Uncategorized Tags: ,

Send email from command line

July 3, 2012 2 comments

I wanted to send an email notification from command line. I launched a program on my desktop machine at my workplace that would require some days to finish. I want to know when it’s finished and I want to get the result too.

The email will be sent via gmail, it’s the easiest solution. Here, Sid explains nicely how to configure ssmtp on a desktop. Here I repeat the steps:

Step one:
Install ssmtp: “sudo apt-get install ssmtp“.

Step two:
Edit the file /etc/ssmtp/ssmtp.conf and add the following content:

For this purpose, I created a dedicated Gmail account.

Step three:
Test if it works: “ssmtp < filename.txt“.

You can also send emails with the command “mail“:

mail -s "Subject of the mail" < result.txt

Use Case
In the intro I mentioned that I want to get the result of a slow program. Here is how I did it: the program writes the result in a file called “result.txt“. When it’s finished, a shell script is called that sends the content of result.txt to me:

time ./pe_211.d && ./

Where looks like this:

mail -s "PE 211" < result.txt

Related links