Use Case: SMTP to Telegram

Telegram is a cloud-based mobile and desktop messaging app.

  1. VMR receives SMTP email.
  2. VMR sends HTTPS request to Telegram bot to send message to chat group.

Please follow the following configuration steps.

  1. Launch Telegram.
  2. Search @botfather to send message to it.
    This is a bot used to create other bots.
  3. Type /newbot to create a new bot.
  4. Give your new bot a name and user name.
  5. Once created, your bot will have a token string in the form of “111111111:AAAAAAA”.
    Take note of the token string as VMR will use it to control the bot.
  1. Create a new group in Telegram.
    This group will receive VMR alerts.
  2. Add your bot to the chat group.
  3. Name the group.
  4. Add contacts to this group.
  5. Add @RawDataBot to this group.
    This bot will reply with the group chat_id.
    Take note of this chat_id.
  6. Get each contact to send a message to your new bot so that the bot can send message to them in a group.
  1. From VMR’s web interface, access Outbound Profiles > HTTP Profiles.
  2. Create a new HTTP Profile.
    • Profile name: Telegram bot
    • Type: GET
    • Base URL: https://api.telegram.org/bot<%newbot_tokenstring%>/sendMessage.
      Replace <%newbot_tokenstring%> with your new bot’s token string.
    • Key/Value: chat_id / <%chat_id%>
      Replace <%chat_id%> with your group chat_id
    • Key/Value: text={MessageText}
  3. Click Insert.

  1. From VMR’s web interface, access Message Processing > Transmission Actions
  2. Create a new Transmission Action
    • Action Name: Telegram bot action
    • Delivery Method: HTTP
    • Use Cellular Data: Check if Telegram will be sent using cellular data
    • HTTP Profiles: Check “Telegram bot” created in the last step.
  3. Click Insert.

  1. From VMR’s web interface, access Message Processing > Inbound Filters
  2. Create a new Inbound Filter
    • Inbound Message Type: SMTP
  3. Click Add Filter.
  4. Key in the details
    • Name: Email to Telegram
    • Assign Transmission Action: Check “Telegram bot action” created in the last step
    • Threshold: None
  5. Click Insert.

  1. From VMR’s web interface, access Control Panel.
  2. Stop and start the service.
    Now you can send an email to VMR and convert it to Telegram message.