
內容簡介
這個外掛可以將 Contact Form 7 的訊息透過機器人發送到 Telegram 聊天群組中,簡化了聯絡表單的通知流程,並提供即時通訊的便利性。
【主要功能】
• 將 Contact Form 7 訊息發送至 Telegram
• 支援多位 Telegram 收件人
• 自訂訊息格式與傳送參數
• 設定訂閱者名單與群組
• 簡易的機器人設定流程
外掛標籤
開發者團隊
② 後台搜尋「Message Bridge for Contact Form 7 and Telegram」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
This plugin lets you send Contact Form 7 messages to Telegram chats via a bot. Setup takes just a few steps:
Create a Telegram bot (how to).
Create a bot in the plugin UI.
Paste the bot token into the bot form (PHP constants also available).
Create a bridge in the plugin UI. A bridge links Contact Form 7 forms, a Telegram bot, and one or more Telegram recipients.
Add users to the subscriber list by sending the /cf7tg_start command to your bot. To add a group, first add the bot to the group, then send /cf7tg_start in that group.
Approve or decline subscription requests on the Contact Form 7 → CF7 Telegram settings page.
Configure the bridge: choose which forms it handles and which Telegram recipients should receive those messages. Create at least one bridge to run the integration, and add more when different forms should send messages to different sets of Telegram recipients.
The integration is configured correctly when the bot panel is highlighted in blue and the bridge panel is highlighted in green.
Hooks and constants
Filter wpcf7tg_skip_tg
Use it to skip sending a Telegram message.
Filter wpcf7tg_markdown
Use it to customize the allowed Markdown tags.
Filter wpcf7tg_sendMessage( $args, $chat_id, $mode )
Use it to customize Telegram sendMessage arguments for each recipient and message chunk.
Action wpcf7tg_message_sent( $args, $submission )
Runs after each Telegram delivery attempt. A Telegram failure does not abort the Contact Form 7 submission.
Action wpcf7tg_messages_sent( $list, $output, $mode, $submission )
Runs after all configured recipients have been attempted.
Constant WPCF7TG_LOG_RETENTION_DAYS and filter cf7tg/logRetentionDays
Set the log retention period in days. The default is 30; set it to 0 to disable age-based pruning.
Constant WPCF7TG_LOG_MAX_ROWS and filter cf7tg/logMaxRows
Set the maximum number of newest log rows to retain. The default is 10000.
Constants WPCF7TG_PING_INTERVAL and WPCF7TG_UPDATES_INTERVAL
Set the offline bot status retry interval and the online Telegram update polling interval in milliseconds. The defaults are 5000 and 12000 respectively.
This plugin uses API Telegram and sends remote HTTP requests to Telegram servers to deliver notifications.
