Skip to content

Commit

Permalink
fix port to string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
beac0n committed Jan 19, 2020
1 parent d9da07d commit 51045b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/feed/feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"gofeedtomail/src/config"
"log"
"net/smtp"
"strconv"
"time"
)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 51045b5

Please sign in to comment.