open-microservice-api

command module
v0.0.0-...-b2a1992 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

open-microservice-api

  1. send mail via google mail

Install

set environment

PORT=8080;MAIL_USER=;MAIL_PASSWORD=

MAIL_USER is your google acount,MAIL_PASSWORD is your google account's app password

Get Google Account App Password

https://myaccount.google.com/security turn on 2-Step Verification App password geneate app password

send mail

curl
curl --location --request POST 'https://localhost:8080' \
--header 'User-Agent: apifox/1.0.0 (https://www.apifox.cn)' \
--header 'Content-Type: application/json' \
--data-raw '{
  "to": "to",
  "subject": "sbuject",
  "body": "body"
}'
pytyon requests
import requests
import json

url = "https://localhost:8080"

payload = json.dumps({
   "to": "litong@hawaii.edu",
   "subject": "王志安 更新",
   "body": "王志安有更新了信息,请访问下面的地址查看."
})
headers = {
   'User-Agent': 'apifox/1.0.0 (https://www.apifox.cn)',
   'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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