You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
tgmail/main.go

33 lines
441 B

package main
import (
"git.ddd.rip/ptrcnull/telegram"
"log"
"net"
"os"
"tgmail/server"
)
func main() {
server.Tg = telegram.Client{
Token: os.Getenv("TELEGRAM_TOKEN"),
}
l, err := net.Listen("tcp", "0.0.0.0:25")
if err != nil {
panic(err)
}
defer l.Close()
log.Println("Listening!")
for {
c, err := l.Accept()
if err != nil {
log.Println(err)
return
}
log.Println("UwU")
go server.Handle(c)
}
}