New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/JohannesEbke/emailbot

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/JohannesEbke/emailbot

  • v0.0.0-20180404210716-9ccd59d42e98
  • Source
  • Go
  • Socket score

Version published
Created
Source

GoDoc Build Status Go Report Card

emailbot

Library to develop email-based bots.

What does it do?

This library syncs an IMAP folder to disk, and then calls processing functions separately on new and all emails. It can record its steps in YAML sidecar files next to each email. It uses flock to lock processing steps.

Based on

github.com/JohannesEbke/go-imap-sync

Example (complete)

package main

import (
	"log"
	"time"
	"github.com/JohannesEbke/emailbot"
)

func main() {
	emailbot.Main(addDownloadedRecord, printDetails)
}

func addDownloadedRecord(_ string, data emailbot.SidecarData) (*emailbot.Record, error) {
	return &emailbot.Record{Time: time.Now(), Key: "synced"}, nil
}

func printDetails(emailFile string, data emailbot.SidecarData) (*emailbot.Record, error) {
	log.Printf("%s: %v", emailFile, data)
	return nil, nil
}

FAQs

Package last updated on 04 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc