Linux 软件免费装
Banner图

AroksDS Submission Alerts for Contact Form 7 to Telegram

开发者 aroksds2026
更新时间 2026年3月1日 02:22
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

telegram contact form 7 cf7 notifications form submissions

下载

1.0.1

详情介绍:

Email is not a reliable operational channel for lead intake. Even when Contact Form 7 reports “mail sent”, real-world delivery can fail: messages may land in spam, be blocked by SMTP/DMARC rules, get throttled, or simply never reach the inbox in time. The result is the worst-case scenario: a lead is submitted, but nobody sees it. AroksDS Submission Alerts for Contact Form 7 to Telegram creates a second, independent delivery path: every successful form submission can generate an instant Telegram notification in a shared team space (group, private chat, or a forum topic). This gives you a practical “backup channel” so leads are not lost when email delivery is unreliable. Why this plugin is useful Key features What this plugin does NOT do (to avoid misunderstandings) External services This plugin connects to the Telegram Bot API to send messages. When: On successful Contact Form 7 submissions (wpcf7_mail_sent) and when you click "Send test message" in wp-admin. Data sent: chat_id, message text (built from your template and filtered form fields), optional parse_mode, optional message_thread_id, disable_web_page_preview. Privacy controls: limit what is sent by configuring Allowed/Excluded fields and by editing the message template. Note: Telegram is a third-party service. Site owners are responsible for the data they send to Telegram. Avoid sending sensitive personal data unless necessary.

安装:

  1. Install and activate Contact Form 7.
  2. Install this plugin (Plugins → Add New → Upload) or upload to /wp-content/plugins/.
  3. Activate the plugin.
  4. Go to Settings → AroksDS Submission Alerts for Contact Form 7 to Telegram.
  5. Add your Bot Token and Default Chat ID.
  6. (Optional) Set Default Message Thread ID for Telegram forum topics.
  7. Configure template and Allowed/Excluded fields if needed.
  8. Use the Tools tab to send a test message.
  9. Submit a Contact Form 7 form to verify real submissions.

屏幕截图:

  • Tools tab (send a test message).
  • Logs tab (last 100 entries and clear logs).

升级注意事项:

1.0.1 Security and reliability fixes (placeholder handling, admin rules UI, multiline fields). 1.0.0 First public release.

常见问题:

Does it send only when email was sent successfully?

Yes. This WordPress.org edition triggers only on Contact Form 7 wpcf7_mail_sent (success-only).

Why use Telegram if CF7 already sends emails?

Because email delivery can fail in practice (spam filters, SMTP misconfiguration, provider blocks, DMARC policies, throttling). Telegram provides a second, independent notification channel to reduce lost leads.

How do I get a bot token?

Create a bot with Telegram’s BotFather and copy the token it gives you. Then paste the token into the plugin settings.

How do I send to a Telegram group?

  1. Add your bot to the group.
  2. Ensure the bot has permission to post messages.
  3. Use the group chat ID as the target Chat ID.

How do I find my Chat ID?

Telegram chat IDs depend on the chat type:

  • Private chat: usually a positive numeric ID.
  • Groups/supergroups: often negative IDs (starting with -). Use a helper method you trust to read the chat ID after you send a message where the bot can see it.

What is “Message Thread ID”?

It is used for Telegram forum topics. If your group has topics enabled, you can send to a specific topic by setting the Message Thread ID.

Can I route different forms to different Telegram chats?

Yes. Use Per-form Rules and set the Contact Form 7 Form ID and target Chat ID (and optional Thread ID).

How do Allowed/Excluded fields work?

  • If Allowed fields has any values, only those fields are included.
  • Otherwise, if Excluded fields has values, all fields are included except excluded ones. The same rules apply to {all_fields} and {field-name} placeholders.

Does it send attachments/files?

No. This plugin sends text messages via Telegram Bot API sendMessage.

Where are logs stored? Do they include the bot token?

Logs are stored in your WordPress database as an option and keep only the last 100 entries. The bot token is never stored in logs.

Typical Telegram errors and what they mean

  • chat not found → wrong Chat ID or the bot cannot access that chat.
  • bot was blocked by the user → the user blocked the bot.
  • not enough rights to send text messages → bot permissions in the group are insufficient.
  • Bad Request: message is too long → reduce {all_fields} or exclude large fields.

Can I use a constant or environment variable for the token?

Yes:

  • define('CF7_TG_BOT_TOKEN', '...') in wp-config.php, or
  • environment variable CF7_TG_BOT_TOKEN When provided this way, the token field in Settings is locked.

更新日志:

1.0.1 1.0.0