网络知识网

一、流程

  • 帐号
  • 邮箱
  1. 进入注册账号网址;
  2. 输入自定义账号、密码;
  3. 进入一次性临时邮箱网址,获取邮箱账号;
  4. 输入邮箱账号,并点击发送验证码;
  5. 到临时邮箱网址获取邮件;
  6. 输入验证码,并点击校验即可。

二、接口流程化

1. 获取邮件

# 1. 获取临时邮箱
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/x-www-form-urlencoded")

$body = "type=newemail"

$response = Invoke-RestMethod 'https://tmailor.com/wtf' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

# 2. 检测邮箱是否接受到邮件
	# 相关入参:
		# m 1
		# email 对应“获取临时邮箱”响应体中“email”
		# token 对应“获取临时邮箱”响应体中“accesstoken”
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/x-www-form-urlencoded")

$body = "m=1&email=akuabfhq%40pingddns.org&token=LJgn1LJxWznhUSNnpTyohM2sExouaZhdo3WcasUvEgLaJyfto3VqhL2q9gsaUqyfLajbkAGeL3Ztwp1"

$response = Invoke-RestMethod 'https://s992000-graph.tmailor.com/email/check' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

# 3. 获取邮件内容
	# 相关入参:
		# v 1
		# token 对应“检测邮箱是否接受到邮件”响应体中“email_id”
		# usertoken 对应“获取临时邮箱”响应体中“accesstoken”
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Accept", "application/json")
$headers.Add("Content-Type", "application/x-www-form-urlencoded")

$body = "v=1&token=LJgn1LJxWznhUSNnpTyohM2sExouaZhdo3WcasQvt2BaGD4tAwZq%3D&usertoken=LJgn1LJxWznhUSNnpTyohM2sExouaZhdo3WcasUvEgLaJyfto3VqhL2q9gsaUqyfLajbkAGeL3Ztwp1"

$response = Invoke-RestMethod 'https://s992000-graph.tmailor.com/email/view' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

# 4. 根据第三步中的$.content进行base64解码

附录

你可能感兴趣的:(服务器)