This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package rabbitmq | |
| import ( | |
| "SendEmail-Service/mail" | |
| "SendEmail-Service/pkg/config" | |
| "log" | |
| "github.com/streadway/amqp" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package rabbitmq | |
| import ( | |
| "SendEmail-Service/pkg/config" | |
| "github.com/streadway/amqp" | |
| ) | |
| func Publisher(msg []byte, queueName string) error { | |
| //rabbitmq url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package parseHtml | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "html/template" | |
| "log" | |
| ) | |
| // htmli parse ediyoruz bazi htmller parametre alabilir bunun ornegi icin weeklyreporttemplate bakmanizi oneririm | |
| func FeatureNotificationTemplate() string { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package logic | |
| import ( | |
| "SendEmail-Service/pkg/db" | |
| "SendEmail-Service/pkg/models" | |
| "SendEmail-Service/pkg/rabbitmq" | |
| "log" | |
| ) | |
| func BulkMail(template string) error { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package logic | |
| import ( | |
| "SendEmail-Service/pkg/rabbitmq" | |
| "log" | |
| ) | |
| func Transactional(email []byte,template string)error{ | |
| if email==nil{ | |
| log.Println("email is empty") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mail | |
| import ( | |
| "SendEmail-Service/pkg/config" | |
| "SendEmail-Service/pkg/parseHtml" | |
| "fmt" | |
| "net/smtp" | |
| ) | |
| // maili gonderecek olan maile giris yapiyoruz | |
| func auth(senderMail string, senderPassword string, smtpHost string) smtp.Auth { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "SendEmail-Service/logic" | |
| "SendEmail-Service/pkg/rabbitmq" | |
| "log" | |
| "github.com/gofiber/fiber/v2" | |
| "github.com/gofiber/fiber/v2/middleware/logger" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package parseHtml | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "html/template" | |
| "log" | |
| ) | |
| // htmli parse ediyoruz bazi htmller parametre alabilir bunun ornegi icin weeklyreporttemplate bakmanizi oneririm | |
| func FeatureNotificationTemplate() string { |