socialimap

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package socialimap provides IMAP connection testing and inbox reading for the Social Media feature. Gmail is the primary target (imap.gmail.com:993 with an App Password), but any IMAP server works.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     int
	Username string
	Password string
}

Config holds the IMAP connection parameters. Password is plaintext only at the boundary; callers encrypt it before persistence.

func DefaultGmail

func DefaultGmail() Config

DefaultGmail returns sensible Gmail defaults.

func (Config) FetchRecent

func (c Config) FetchRecent(n int) ([]Message, error)

FetchRecent returns the n most recent messages from INBOX.

func (Config) Test

func (c Config) Test() (int, error)

Test connects, logs in, and returns the inbox message count. It does not persist anything.

type Message

type Message struct {
	Subject string
	From    string
	Date    time.Time
	Snippet string
}

Message is a simplified inbox message for verification/OTP extraction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL