mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-05 04:52:58 +00:00
w355w
This commit is contained in:
@@ -256,7 +256,7 @@ func getVisitorId(w http.ResponseWriter, r *http.Request) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate a new unique ID
|
// Generate a new unique ID
|
||||||
visitorId := fmt.Sprintf("%x", md5.Sum([]byte(time.Now().String() + randomString(16))))
|
visitorId := fmt.Sprintf("%x", md5.Sum([]byte(time.Now().String()+randomString(16))))
|
||||||
|
|
||||||
// Set the cookie to expire in 1 year
|
// Set the cookie to expire in 1 year
|
||||||
http.SetCookie(w, &http.Cookie{
|
http.SetCookie(w, &http.Cookie{
|
||||||
@@ -1423,11 +1423,11 @@ func handleSubmit(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func sendEmail(entry TripEntry, parsedDateStart, parsedDateEnd time.Time, czechMonths []string) error {
|
func sendEmail(entry TripEntry, parsedDateStart, parsedDateEnd time.Time, czechMonths []string) error {
|
||||||
smtpHost := "mail.pp-kunovice.cz"
|
smtpHost := "smtp.purelymail.com"
|
||||||
smtpPort := 465
|
smtpPort := 465
|
||||||
sender := "sluzebnicek@pp-kunovice.cz"
|
sender := "info@tdvorak.dev"
|
||||||
password := "7g}qznB5bj"
|
password := "%8s3Yad*!b3*t"
|
||||||
recipient := "sluzebnicek@pp-kunovice.cz"
|
recipient := "info@tdvorak.dev"
|
||||||
|
|
||||||
m := gomail.NewMessage()
|
m := gomail.NewMessage()
|
||||||
m.SetHeader("From", sender)
|
m.SetHeader("From", sender)
|
||||||
|
|||||||
Reference in New Issue
Block a user