func FilterWashiTags(body *[]byte, cid string) map[string]LinksData {
	return filteratags(washireg, body, cid)
}
FilterWashiTags is to filter, find all {{WASHI}} tag data
package mails
import (
	"bytes"
	"crypto/md5"
	"fmt"
	"net/url"
	"os"
	"regexp"
	"sync"
	"github.com/toomore/mailbox/campaign"
	"github.com/toomore/mailbox/utils"
)
var (
	htmla    = regexp.MustCompile(`href="(http[s]?://[a-zA-z0-9/\.:?=,-@%()_&\+#]+)"`)
	washireg = regexp.MustCompile(`href="({{WASHI}}.+{{\/WASHI}})"`)
)
func ReplaceReader(html *[]byte, cid string, seed string, uid string) {
	data := url.Values{}
	data.Set("c", cid)
	data.Set("u", uid)
	hm := campaign.MakeMacSeed(seed, data)
	*html = bytes.Replace(
		*html,
		[]byte("{{READER}}"),
		[]byte(fmt.Sprintf("https://%s/read/%x?%s", os.Getenv("mailbox_web_site"), hm, data.Encode())),
		1)
}
func ReplaceFname(html *[]byte, fname string) {
	*html = bytes.Replace(*html, []byte("{{FNAME}}"), []byte(fname), -1)
}
func ReplaceLname(html *[]byte, lname string) {
	*html = bytes.Replace(*html, []byte("{{LNAME}}"), []byte(lname), -1)
}
func ReplaceATag(html *[]byte, allATags map[string]LinksData, cid string, seed string, uid string) {
	data := url.Values{}
	data.Set("c", cid)
	data.Set("u", uid)
	data.Set("t", "a")
	for _, v := range allATags {
		data.Set("l", v.LinkID)
		hm := campaign.MakeMacSeed(seed, data)
		*html = bytes.Replace(*html, []byte(fmt.Sprintf("href=\"%s\"", v.URL)),
			[]byte(fmt.Sprintf("href=\"https://%s/door/%x?%s\"", os.Getenv("mailbox_web_site"), hm, data.Encode())), -1)
	}
}
func ReplaceWashiTag(html *[]byte, allATags map[string]LinksData, cid string, seed string, uid string) {
	data := url.Values{}
	data.Set("c", cid)
	data.Set("u", uid)
	for _, v := range allATags {
		data.Set("l", v.LinkID)
		hm := campaign.MakeMacSeed(seed, data)
		*html = bytes.Replace(*html, []byte(fmt.Sprintf("href=\"%s\"", v.URL)),
			[]byte(fmt.Sprintf("href=\"https://%s/washi/%x?%s\"", os.Getenv("mailbox_web_site"), hm, data.Encode())), -1)
	}
}
type LinksData struct {
	Md5h   string
	LinkID string
	URL    []byte
}
func FilterATags(body *[]byte, cid string) map[string]LinksData {
	return filteratags(htmla, body, cid)
}