outputemail

package
v0.0.0-...-7697303 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2017 License: LGPL-3.0 Imports: 6 Imported by: 0

README

gogstash output email

Synopsis

{
    "output": [
        {
            "type": "email",

            // (required)
            "address": "smtp.xxx.com",

            // (required)
            "username": "your_user_name",

            // (required)
            "password": "your_password",

            // (required)
            "subject": "your subject",

            // (required)
            "from": "from@youremail",

            // (required)
            "to": "your1@youremail.com;your2@youremail.com",

            // (optional)
            "cc": "cc1@youremail.com;cc2@youremail.com",

            // (optional)
            "port": 25,

            // (optional)
            "use_tls": true,

            // (optional)
            "attachments": ["/your_path/your_file"],
        }
    ]
}

Documentation

Index

Constants

View Source
const ModuleName = "email"

ModuleName is the name used in config file

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(ctx context.Context, raw *config.ConfigRaw) (config.TypeOutputConfig, error)

InitHandler initialize the output plugin

Types

type OutputConfig

type OutputConfig struct {
	config.OutputConfig
	Address     string   `json:"address"`
	Attachments []string `json:"attachments"`
	From        string   `json:"from"`
	To          string   `json:"to"`
	Cc          string   `json:"cc"`
	Subject     string   `json:"subject"`
	Port        int      `json:"port"`
	UseTLS      bool     `json:"use_tls"`
	UserName    string   `json:"username"`
	Password    string   `json:"password"`
}

OutputConfig holds the configuration json fields and internal objects

func DefaultOutputConfig

func DefaultOutputConfig() OutputConfig

DefaultOutputConfig returns an OutputConfig struct with default values

func (*OutputConfig) Output

func (t *OutputConfig) Output(ctx context.Context, event logevent.LogEvent) (err error)

Output event

Jump to

Keyboard shortcuts

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