TableName (models/imap.go)

gophish · models/imap.go · go · MIT
email

Stores IMAP server credentials and polling settings for email campaign reporting.

// Source: https://github.com/gophish/gophish | License: MIT | Copyright 2013-2020 Jordan Wright
// Provided via justclaw.it.com; keep this notice with the code.
package models

import (
	"errors"
	"net"
	"time"

	log "github.com/gophish/gophish/logger"
)

const DefaultIMAPFolder = "INBOX"
const DefaultIMAPFreq = 60 // Every 60 seconds

// IMAP contains the attributes needed to handle logging into an IMAP server to check
// for reported emails
type IMAP struct {
	UserId                      int64     `json:"-" gorm:"column:user_id"`
	Enabled                     bool      `json:"enabled"`
	Host                        string    `json:"host"`
	Port                        uint16    `json:"port,string,omitempty"`
	Username                    string    `json:"username"`
	Password                

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key