From 51045b50791efd72b52cb1639e8ff7ef97f56894 Mon Sep 17 00:00:00 2001 From: beac0n Date: Sun, 19 Jan 2020 11:49:29 +0100 Subject: [PATCH] fix port to string conversion --- src/feed/feed.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/feed/feed.go b/src/feed/feed.go index 4baed3d..305c887 100644 --- a/src/feed/feed.go +++ b/src/feed/feed.go @@ -5,6 +5,7 @@ import ( "gofeedtomail/src/config" "log" "net/smtp" + "strconv" "time" ) @@ -52,7 +53,7 @@ func (feed *Feed) processFeedItem(feedTitle string, item *gofeed.Item) { item.Content log.Println("sending mail for " + item.Link) - address := feed.conf.Host + ":" + string(feed.conf.Port) + address := feed.conf.Host + ":" + strconv.FormatInt(feed.conf.Port, 10) auth := smtp.PlainAuth("", feed.conf.From, feed.conf.Password, feed.conf.Host) if err := smtp.SendMail(address, auth, feed.conf.From, []string{feed.conf.To}, []byte(msg)); err != nil { log.Fatal(err)