Screenshots
About this component
Send transactional emails via Gmail API with OAuth 2.0 authentication
Versions
v1.1.0
2026-08-01
- SECURITY: Email header injection is now prevented — subject, from, to/cc/bcc, reply_to, custom header names/values and attachment/inline filenames are CRLF/control-char validated before building the MIME message, so an embedded newline can no longer inject extra headers.
- SECURITY: token_uri is hard-allowlisted to Google's OAuth endpoints (both in __init__ and validate_credentials). refresh() POSTs the refresh token and client_secret to token_uri, so an attacker-supplied value would have exfiltrated credentials.
v1.0.3
2026-03-02
# Changelog
All notable changes to the Gmail API email provider will be documented in this file.
## [1.0.1] - 2025-10-28
### Fixed
- Fixed SVG logo display issue on provider browse page
- Added explicit width and height attributes to logo.svg (88x66px)
- Logo now displays correctly at proper dimensions instead of 0x0
### Technical Details
- Updated logo.svg with `width="88" height="66"` attributes
- Ensures proper rendering in browsers when SVG is used as `<img>` tag
- No functional changes to provider code
## [1.0.0] - 2025-10-25
### Added
- Initial release of Gmail API email provider
- OAuth 2.0 authentication with automatic token refresh
- Send transactional emails via Gmail API
- HTML and plain text email support
- File attachment support (up to 25MB per email)
- Inline image support with Content-ID references
- CC and BCC recipient support
- Custom email headers support
- Reply-To header support
- Encrypted credential storage using Fernet encryption
- Comprehensive error handling:
- 401 Unauthorized (invalid/expired token)
- 403 Forbidden (insufficient permissions)
- 429 Rate Limit Exceeded
- Network timeout handling
- Health check endpoint via Gmail API profile
- Rate limit information (15/sec, 2000/day for Workspace)
- Credential validation before storage
- Credential redaction for logging security
- Full docstrings and type hints
- Unit test coverage for core functionality
- Integration test examples
### Security
- OAuth tokens encrypted at rest using Fernet symmetric encryption
- Minimal OAuth scope (gmail.send only)
- Sensitive credentials redacted in logs
- HTTPS-only API communication
- Automatic token refresh without exposing credentials
### Documentation
- Comprehensive README with setup instructions
- OAuth 2.0 configuration guide
- Sending limits documentation
- Best practices for production use
- Troubleshooting guide
- Security considerations
- API reference links
### Technical Details
- Provider Key: `gmail_api`
- Class Name: `GmailProvider`
- OAuth Scope: `https://www.googleapis.com/auth/gmail.send`
- API Version: Gmail API v1
- Python Dependencies:
- google-auth >= 2.41.0
- google-auth-oauthlib >= 1.2.0
- google-auth-httplib2 >= 0.2.0
- google-api-python-client >= 2.185.0
### Limitations
- No webhook support (Gmail API doesn't provide webhooks)
- No email tracking (open/click tracking)
- No batch send support
- Subject to Gmail sending limits (500-2000 emails/day)
## Future Enhancements (Planned)
### v1.1.0
- Batch sending support (send multiple emails in one API call)
- Scheduled sending
- Save sent emails to Gmail "Sent" folder option
- Draft management
### v1.2.0
- Gmail Pub/Sub for bounce notifications
- Enhanced delivery tracking
- Email templates stored in Gmail
### v2.0.0
- Google Workspace admin features
- Domain-wide delegation support
- Advanced routing rules
- Compliance and archiving features
v1.0.2
2025-10-29
# Changelog
All notable changes to the Gmail API email provider will be documented in this file.
## [1.0.1] - 2025-10-28
### Fixed
- Fixed SVG logo display issue on provider browse page
- Added explicit width and height attributes to logo.svg (88x66px)
- Logo now displays correctly at proper dimensions instead of 0x0
### Technical Details
- Updated logo.svg with `width="88" height="66"` attributes
- Ensures proper rendering in browsers when SVG is used as `<img>` tag
- No functional changes to provider code
## [1.0.0] - 2025-10-25
### Added
- Initial release of Gmail API email provider
- OAuth 2.0 authentication with automatic token refresh
- Send transactional emails via Gmail API
- HTML and plain text email support
- File attachment support (up to 25MB per email)
- Inline image support with Content-ID references
- CC and BCC recipient support
- Custom email headers support
- Reply-To header support
- Encrypted credential storage using Fernet encryption
- Comprehensive error handling:
- 401 Unauthorized (invalid/expired token)
- 403 Forbidden (insufficient permissions)
- 429 Rate Limit Exceeded
- Network timeout handling
- Health check endpoint via Gmail API profile
- Rate limit information (15/sec, 2000/day for Workspace)
- Credential validation before storage
- Credential redaction for logging security
- Full docstrings and type hints
- Unit test coverage for core functionality
- Integration test examples
### Security
- OAuth tokens encrypted at rest using Fernet symmetric encryption
- Minimal OAuth scope (gmail.send only)
- Sensitive credentials redacted in logs
- HTTPS-only API communication
- Automatic token refresh without exposing credentials
### Documentation
- Comprehensive README with setup instructions
- OAuth 2.0 configuration guide
- Sending limits documentation
- Best practices for production use
- Troubleshooting guide
- Security considerations
- API reference links
### Technical Details
- Provider Key: `gmail_api`
- Class Name: `GmailProvider`
- OAuth Scope: `https://www.googleapis.com/auth/gmail.send`
- API Version: Gmail API v1
- Python Dependencies:
- google-auth >= 2.41.0
- google-auth-oauthlib >= 1.2.0
- google-auth-httplib2 >= 0.2.0
- google-api-python-client >= 2.185.0
### Limitations
- No webhook support (Gmail API doesn't provide webhooks)
- No email tracking (open/click tracking)
- No batch send support
- Subject to Gmail sending limits (500-2000 emails/day)
## Future Enhancements (Planned)
### v1.1.0
- Batch sending support (send multiple emails in one API call)
- Scheduled sending
- Save sent emails to Gmail "Sent" folder option
- Draft management
### v1.2.0
- Gmail Pub/Sub for bounce notifications
- Enhanced delivery tracking
- Email templates stored in Gmail
### v2.0.0
- Google Workspace admin features
- Domain-wide delegation support
- Advanced routing rules
- Compliance and archiving features
v1.0.1
2025-10-28
# Changelog
All notable changes to the Gmail API email provider will be documented in this file.
## [1.0.1] - 2025-10-28
### Fixed
- Fixed SVG logo display issue on provider browse page
- Added explicit width and height attributes to logo.svg (88x66px)
- Logo now displays correctly at proper dimensions instead of 0x0
### Technical Details
- Updated logo.svg with `width="88" height="66"` attributes
- Ensures proper rendering in browsers when SVG is used as `<img>` tag
- No functional changes to provider code
## [1.0.0] - 2025-10-25
### Added
- Initial release of Gmail API email provider
- OAuth 2.0 authentication with automatic token refresh
- Send transactional emails via Gmail API
- HTML and plain text email support
- File attachment support (up to 25MB per email)
- Inline image support with Content-ID references
- CC and BCC recipient support
- Custom email headers support
- Reply-To header support
- Encrypted credential storage using Fernet encryption
- Comprehensive error handling:
- 401 Unauthorized (invalid/expired token)
- 403 Forbidden (insufficient permissions)
- 429 Rate Limit Exceeded
- Network timeout handling
- Health check endpoint via Gmail API profile
- Rate limit information (15/sec, 2000/day for Workspace)
- Credential validation before storage
- Credential redaction for logging security
- Full docstrings and type hints
- Unit test coverage for core functionality
- Integration test examples
### Security
- OAuth tokens encrypted at rest using Fernet symmetric encryption
- Minimal OAuth scope (gmail.send only)
- Sensitive credentials redacted in logs
- HTTPS-only API communication
- Automatic token refresh without exposing credentials
### Documentation
- Comprehensive README with setup instructions
- OAuth 2.0 configuration guide
- Sending limits documentation
- Best practices for production use
- Troubleshooting guide
- Security considerations
- API reference links
### Technical Details
- Provider Key: `gmail_api`
- Class Name: `GmailProvider`
- OAuth Scope: `https://www.googleapis.com/auth/gmail.send`
- API Version: Gmail API v1
- Python Dependencies:
- google-auth >= 2.41.0
- google-auth-oauthlib >= 1.2.0
- google-auth-httplib2 >= 0.2.0
- google-api-python-client >= 2.185.0
### Limitations
- No webhook support (Gmail API doesn't provide webhooks)
- No email tracking (open/click tracking)
- No batch send support
- Subject to Gmail sending limits (500-2000 emails/day)
## Future Enhancements (Planned)
### v1.1.0
- Batch sending support (send multiple emails in one API call)
- Scheduled sending
- Save sent emails to Gmail "Sent" folder option
- Draft management
### v1.2.0
- Gmail Pub/Sub for bounce notifications
- Enhanced delivery tracking
- Email templates stored in Gmail
### v2.0.0
- Google Workspace admin features
- Domain-wide delegation support
- Advanced routing rules
- Compliance and archiving features
v1.0.0
2025-10-25
# Changelog
All notable changes to the Gmail API email provider will be documented in this file.
## [1.0.0] - 2025-10-25
### Added
- Initial release of Gmail API email provider
- OAuth 2.0 authentication with automatic token refresh
- Send transactional emails via Gmail API
- HTML and plain text email support
- File attachment support (up to 25MB per email)
- Inline image support with Content-ID references
- CC and BCC recipient support
- Custom email headers support
- Reply-To header support
- Encrypted credential storage using Fernet encryption
- Comprehensive error handling:
- 401 Unauthorized (invalid/expired token)
- 403 Forbidden (insufficient permissions)
- 429 Rate Limit Exceeded
- Network timeout handling
- Health check endpoint via Gmail API profile
- Rate limit information (15/sec, 2000/day for Workspace)
- Credential validation before storage
- Credential redaction for logging security
- Full docstrings and type hints
- Unit test coverage for core functionality
- Integration test examples
### Security
- OAuth tokens encrypted at rest using Fernet symmetric encryption
- Minimal OAuth scope (gmail.send only)
- Sensitive credentials redacted in logs
- HTTPS-only API communication
- Automatic token refresh without exposing credentials
### Documentation
- Comprehensive README with setup instructions
- OAuth 2.0 configuration guide
- Sending limits documentation
- Best practices for production use
- Troubleshooting guide
- Security considerations
- API reference links
### Technical Details
- Provider Key: `gmail_api`
- Class Name: `GmailProvider`
- OAuth Scope: `https://www.googleapis.com/auth/gmail.send`
- API Version: Gmail API v1
- Python Dependencies:
- google-auth >= 2.41.0
- google-auth-oauthlib >= 1.2.0
- google-auth-httplib2 >= 0.2.0
- google-api-python-client >= 2.185.0
### Limitations
- No webhook support (Gmail API doesn't provide webhooks)
- No email tracking (open/click tracking)
- No batch send support
- Subject to Gmail sending limits (500-2000 emails/day)
## Future Enhancements (Planned)
### v1.1.0
- Batch sending support (send multiple emails in one API call)
- Scheduled sending
- Save sent emails to Gmail "Sent" folder option
- Draft management
### v1.2.0
- Gmail Pub/Sub for bounce notifications
- Enhanced delivery tracking
- Email templates stored in Gmail
### v2.0.0
- Google Workspace admin features
- Domain-wide delegation support
- Advanced routing rules
- Compliance and archiving features
Ready to install Gmail API?
Install from your Spwig admin → Marketplace tab. Don't have a Spwig install yet? The commerce platform is free and open source.
Get Spwig → Browse more