demo5

package
v0.0.0-...-0ca4b4a Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

examples/demo5/login.go

Index

Constants

View Source
const Hostname = "smtp.qq.com"
View Source
const SenderPass = "123456"
View Source
const SenderUser = "1060656096@qq.com"

Variables

View Source
var SendLoginEmail = func(user string) {
	msg := fmt.Sprintf("%s, Welcome to login", user)
	auth := smtp.PlainAuth("", SenderUser, SenderPass, Hostname)
	if err := smtp.SendMail(Hostname, auth, SenderUser, []string{user}, []byte(msg)); err != nil {
		log.Printf("smtp.SendMail(%s) failed: %s", user, err)
	}
}

发送邮件

Functions

func Login

func Login(user, pass string) bool

Login 登录

Types

This section is empty.

Jump to

Keyboard shortcuts

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