email

package
v0.0.0-...-83979ee Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package email 提供邮件操作相关工具 创建者:Done-0 创建时间:2025-08-05

Index

Constants

View Source
const (
	EMAIL_SUBJECT = "【Jank Blog】注册验证码"
)

邮件相关常量

Variables

This section is empty.

Functions

func NewRand

func NewRand() int

NewRand 生成六位数随机验证码 返回值:

int: 六位数随机数

func SendEmail

func SendEmail(content string, toEmails []string) (bool, error)

SendEmail 发送邮件到指定邮箱 参数:

content: 邮件内容
toEmails: 目标邮箱

返回值:

bool: 发送成功返回 true,失败返回 false
error: 执行过程中的错误

Types

This section is empty.

Jump to

Keyboard shortcuts

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