Update email.go
This commit is contained in:
parent
aa49fce3ff
commit
7f8229cad0
1 changed files with 5 additions and 1 deletions
|
|
@ -92,9 +92,13 @@ func Send_email(recipient string, subject string, htmlBody string, textBody stri
|
||||||
aws_ses_id := db.Get_setting("AWS_SES_ID")
|
aws_ses_id := db.Get_setting("AWS_SES_ID")
|
||||||
aws_ses_secret := db.Get_setting("AWS_SES_SECRET")
|
aws_ses_secret := db.Get_setting("AWS_SES_SECRET")
|
||||||
sender := db.Get_setting("AWS_SES_EMAIL_FROM")
|
sender := db.Get_setting("AWS_SES_EMAIL_FROM")
|
||||||
|
region := db.Get_setting("AWS_REGION")
|
||||||
|
if region == "" {
|
||||||
|
region = "us-east-1"
|
||||||
|
}
|
||||||
|
|
||||||
sess, err := session.NewSession(&aws.Config{
|
sess, err := session.NewSession(&aws.Config{
|
||||||
Region: aws.String("us-east-1"),
|
Region: aws.String(region),
|
||||||
Credentials: credentials.NewStaticCredentials(aws_ses_id, aws_ses_secret, ""),
|
Credentials: credentials.NewStaticCredentials(aws_ses_id, aws_ses_secret, ""),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue