paulchakravarti/gmail-sender — pull request #1 by Kami (2013-08-14 00:57:56+00:00)
Title: Allow user to specify 'From' and 'Reply-To' header

## Problem Description

Currently the message `From` field is set to the account username and you can't specify a custom `From` value. Specifying a custom `From` value makes sense if you have multiple "Send mail as" addresses assigned to the account (Gmail supported that - https://support.google.com/mail/answer/22370?hl=en&ctx=mail&authuser=1).

## Proposed Solution

This branch allows user to specify message `From` and `Reply-To` header value. Those values are set by passing `sender` and `reply_to` keyword argument to the `Message` constructor. If the `sender` argument is provided, but the `reply_to` is not, `Reply-To` value is set to the `sender` value.

To preserve the backward compatibility, I've put those two arguments as the last two arguments to the `Message` constructor method.

Example usage:

```python
gmail = GMail(username, password)
sender = 'Foo Bar '
msg = Message('Test Message', to='recipient', text='Hello', sender=sender)
gmail.send(msg)
```

I didn't touch the old code, but newly added code is PEP8 compliant.