Note: If you just can't get it to connect for SMTP, it may be that your employer has blocked access to port 587 via the corporate edition of McAfee. Employers used to just block port 587 via their firewalls. However, when people took their company-owned laptops home, they were then able to connect in GMail. So some have taken to configuring the corporate edition of McAfee to prevent all processes on your PC from connecting to port 587 on ANY server.
Set up Portable Thunderbird and get SMTP working from another PC that you know does not block port 587.
Copy that Portable Thunderbird to your laptop.
See if it now fails. If it does, you know that your laptop has port 587 blocked.
Set up an ssh SOCKS proxy on port 8080.
I do perform the following Trash folder alignment exercise from Lifehacker. I like the behavior that deleting a message deletes all copies of it (even those you said to 'copy' to another Tbird folder). Note that if you really want to keep the other copy, you can move it to your "Local Folders" message store.
Hit the "Config Editor" button next to the "Advanced Configuration" label.
Using the filter entry box at the top, type in mail.server.server and you will see a list of keys and values. One of those keys will be mail.server.serverX.name, where X is a number and the value is the name of your Gmail IMAP account. Remember X.