Skip to main content

Powerful Python package for messaging across multiple platforms (Telegram, VKontakte, WhatsApp, Email)

Project description

๐Ÿ“ฌ Social Spam

Powerful Python package for messaging across multiple platforms

PyPI version Python License: MIT Code style: black

GitHub Repo stars GitHub forks


Simple โ€ข Powerful โ€ข Cross-Platform โ€ข Well-Documented

Supports: Telegram, VKontakte, WhatsApp, Email

โœจ Features

๐Ÿ“ฑ Supported Platforms

  • ๐Ÿ“ง Email - SMTP with attachments
  • ๐Ÿ’ฌ Telegram - Pyrogram 2.0+ support
  • ๐Ÿ”ต VKontakte - Full API integration
  • ๐Ÿ“ฒ WhatsApp - Web automation

๐ŸŽฏ Key Features

  • โœ… Easy to use - Simple and intuitive API
  • ๐Ÿš€ Async ready - Fast and efficient
  • ๐Ÿ“ฆ Bulk sending - Mass messaging support
  • ๐ŸŽจ Rich content - Text, images, files
  • ๐Ÿ”„ Auto-retry - Built-in error handling
  • ๐Ÿ“Š Progress bars - Visual feedback

๐Ÿ†• What's New in v1.3.0

๐ŸŽ‰ Major Update - Completely modernized with 15+ new methods!

+ โœ… 15 new methods across all modules
+ โœ… Email: TLS, CC/BCC, Priority, Templates
+ โœ… Telegram: Documents, Video, Audio, Formatting, User Info
+ โœ… VKontakte: Documents, Audio, Friends, User Info
+ โœ… WhatsApp: File loading, Custom delays
+ โœ… Fixed all import issues (pywhatkit, Mail)
+ โœ… Python 3.8-3.12 support (including latest versions)
+ โœ… Pyrogram 2.0+ compatibility
+ โœ… TgCrypto now optional (better cross-platform support)
+ โœ… All dependencies updated to latest stable versions
+ โœ… Improved error handling and resource management

๐Ÿ“– See CHANGELOG.md for complete details

๐ŸŒŸ New Features Highlights

๐Ÿ“ง Email - Enhanced

  • TLS Support - Gmail, Outlook compatible (use_tls=True)
  • Message Priority - Mark urgent/normal/low
  • CC/BCC - Send copies to multiple recipients
  • Templates - Use {{variables}} for personalization

๐Ÿ’ฌ Telegram - Expanded

  • Documents - Send PDFs, DOCX, ZIP, any files
  • Video & Audio - MP4, MP3, and more
  • Text Formatting - Markdown & HTML support
  • User Info - Get detailed user profiles

๐Ÿ”ต VKontakte - Upgraded

  • Documents - Share files with contacts
  • Voice Messages - Send audio messages
  • Friends API - Get and manage friends list
  • User Profiles - Fetch detailed user information

๐Ÿ“ฒ WhatsApp - Improved

  • File Messages - Load from .txt/.md files
  • Custom Delays - Fine-tune timing control

๐Ÿ“ฆ Installation

# Install from PyPI (recommended)
pip install social-spam

# With optional Telegram speedup (TgCrypto)
pip install social-spam[telegram_speedup]

# Or install from GitHub for latest dev version
pip install -U https://github.com/neluckoff/social_spam/archive/master.zip

Requirements: Python 3.8+

Note: TgCrypto is optional. Telegram works fine without it, but it can be 2-3x faster for bulk operations. If installation fails on your system, the base package will work perfectly.

macOS users: Python 3.8 on macOS may have issues with pywhatkit dependencies (PyObjC requires 3.9+). We recommend Python 3.9+ for macOS.


๐Ÿš€ Quick Start

๐Ÿ“ง Email Example

from social_spam import Mail

# Initialize and connect (with TLS for Gmail)
mail = Mail()
mail.set_server('smtp.gmail.com', 587, use_tls=True)
mail.connect_mail('your@gmail.com', 'app_password')

# Send a simple message
mail.set_message('Hello!', 'How are you?')
mail.send_message('friend@gmail.com')

# Send with priority and CC
mail.set_message('Urgent!', 'Please review ASAP')
mail.set_priority('urgent')
mail.send_message_with_cc_bcc(
    to='boss@company.com',
    cc=['team@company.com']
)

# Use templates for personalization
template = "Hello {{name}}, your code is {{code}}"
mail.set_template_message('Code', template, {'name': 'John', 'code': '1234'})
mail.send_message('john@example.com')

๐Ÿ’ฌ Telegram Example

from social_spam import Telegram

# Connect to Telegram
tg = Telegram()
tg.connect_user(
    api_id=12345,
    api_hash="your_api_hash",
    phone_number="+1234567890"
)

# Send formatted message with document
tg.send_message(
    user_id=123456789,
    message="**Important!** Read the `report.pdf`",
    document="report.pdf",
    parse_mode='markdown'
)

# Send video with caption
tg.send_message(
    user_id=123456789,
    message="Check out this video!",
    video="video.mp4"
)

# Get user information
user_info = tg.get_user_info(123456789)
print(f"User: {user_info['username']}, Premium: {user_info['is_premium']}")

# Mass messaging with formatting
user_ids = [111111, 222222, 333333]
tg.start_selective_spam(
    chats=user_ids,
    message="__Hello__ everyone!",
    parse_mode='markdown'
)

๐Ÿ”ต VKontakte Example

from social_spam import Vkontakte

# Connect with token
vk = Vkontakte()
vk.connect_user(token="your_vk_token")

# Send document
vk.send_message(
    user_id=123456,
    message="ะ’ะพั‚ ั„ะฐะนะป",
    document="document.pdf"
)

# Get friends and send to all
friends = vk.get_friends()
friend_ids = [f['id'] for f in friends]
vk.start_selective_spam(
    chats=friend_ids,
    message="ะŸั€ะธะฒะตั‚ ะฒัะตะผ ะดั€ัƒะทัŒัะผ!"
)

# Get user info
user_info = vk.get_user_info(123456)
print(f"User: {user_info['first_name']} {user_info['last_name']}")

๐Ÿ“ฒ WhatsApp Example

from social_spam import WhatsApp

wa = WhatsApp()

# Load message from file
wa.set_file_message('message.txt')
wa.send_message(phone="+1234567890")

# Send with custom delays
wa.start_bombing(
    phone_number="+1234567890",
    amount=5,
    text="Hello!",
    wait_time=10,
    close_time=2
)

# Send with image
wa.send_message(
    phone="+1234567890",
    text="Check this out!",
    image="image.jpg"
)

๐Ÿ“š Documentation & Examples

Detailed examples for each platform:

Platform Documentation Example Code
๐Ÿ“ง Email Guide Full SMTP integration with attachments
๐Ÿ’ฌ Telegram Guide Pyrogram-based messaging
๐Ÿ”ต VKontakte Guide VK API integration
๐Ÿ“ฒ WhatsApp Guide Web automation

๐ŸŽฏ Use Cases

  • ๐Ÿ“ข Bulk Notifications - Send updates to multiple recipients
  • ๐Ÿค– Chatbots - Build automated messaging bots
  • ๐Ÿ“Š Marketing - Automated marketing campaigns
  • ๐Ÿ”” Alerts - System notifications and alerts
  • ๐Ÿ’ผ Business - Customer communication
  • ๐ŸŽ“ Educational - Learning messaging APIs

๐Ÿ› ๏ธ Advanced Usage

Email with HTML Templates
mail = Mail()
mail.connect_mail('your_email@mail.ru', 'password')
mail.set_message_html('Newsletter', 'template.html', ['logo.png'])
mail.send_message('subscriber@example.com')
Telegram Batch Messaging
tg = Telegram()
tg.connect_user(api_id=12345, api_hash="hash", phone_number="+123456")

# Send to all your contacts
tg.start_all_spam(message="Important update!")

# Message bombing (use responsibly!)
tg.start_bombing(user_id=123456, amount=10, message="Hello!")
Custom SMTP Server with TLS
mail = Mail()
mail.set_server('smtp.gmail.com', 587, use_tls=True)  # TLS support
mail.connect_mail('your@gmail.com', 'app_password')
Telegram with Formatted Messages
tg = Telegram()
tg.connect_user(api_id=12345, api_hash="hash", phone_number="+123")

# Markdown formatting
message = """
**Important Announcement!**

__Details:__
โ€ข Item 1
โ€ข Item 2

Check the `report.pdf`
"""

tg.send_message(
    user_id=123456,
    message=message,
    document='report.pdf',
    parse_mode='markdown'
)
VKontakte Friends Management
vk = Vkontakte()
vk.connect_user(token="your_token")

# Get all friends
friends = vk.get_friends()
print(f"You have {len(friends)} friends")

# Send to specific friends
for friend in friends[:10]:
    vk.send_message(
        user_id=friend['id'],
        message=f"ะŸั€ะธะฒะตั‚, {friend['first_name']}!"
    )

๐Ÿค Contributing

We love contributions! Here's how you can help:

Development Setup:

git clone https://github.com/neluckoff/social_spam.git
cd social_spam
pip install -r requirements.txt
pip install -e .

See CONTRIBUTING.md for detailed guidelines.


๐Ÿ’ฌ Community & Support

๐Ÿ’ฌ Type ๐Ÿ”— Link
๐Ÿ› Bug Reports Create Issue
๐Ÿ’ก Feature Requests Create Issue
โ“ Questions Ask Question
๐Ÿ’ฌ Discussions Join Discussion
๐Ÿ“ง Email neluckoff@gmail.com

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Copyright ยฉ 2022-2025 neluckoff

โญ Show Your Support

If you find this project useful, please consider:

  • โญ Starring the repository
  • ๐Ÿฆ Sharing it with others
  • ๐Ÿ’– Sponsoring the development

Made with โค๏ธ by @neluckoff

โฌ† Back to Top

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

social_spam-1.3.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

social_spam-1.3.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file social_spam-1.3.0.tar.gz.

File metadata

  • Download URL: social_spam-1.3.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for social_spam-1.3.0.tar.gz
Algorithm Hash digest
SHA256 915f42124a34ee0915425ff4026c86cac456ad80050b005d9a1d270e9f803424
MD5 49931337e7beb72a2e591a48f8d56e7f
BLAKE2b-256 d98529fbc140d85d4605b0082b485a449c34d6202bbd4da2773b3ea1f2e342a1

See more details on using hashes here.

File details

Details for the file social_spam-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: social_spam-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for social_spam-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e3b3c7335565fa8db1da18753bc0429333ddac9b66d6056f74870f3d84bb2c9
MD5 9e75e1f435a9d4e59c616a955ab1e6ac
BLAKE2b-256 5d019218b4b2026568d4dd25150d2051b6115b0ef7733514b8441b46aebc6025

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page