Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GO Email Worker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stephan Handuwala
GO Email Worker
Commits
eece614d
Commit
eece614d
authored
May 03, 2019
by
Pasan Mallawaarachchi
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5mins timeout for large files
parent
0953dc47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
worker.go
worker.go
+3
-2
No files found.
worker.go
View file @
eece614d
...
...
@@ -399,11 +399,13 @@ func worker(i int) {
attachment
=
""
}
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
*
5
0
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
*
30
0
)
defer
cancel
()
MailgunResp
,
id
,
err
:=
mg
.
Send
(
ctx
,
message
)
mailSentTimeMailgun
:=
time
.
Now
()
.
In
(
loc
)
.
String
()
if
err
!=
nil
{
// log.Fatal(err)
logmail
(
subject
,
sender
,
recipient
,
cc
,
bcc
,
attachment
,
readTimeOutbox
,
mailSentTimeMailgun
,
id
,
err
.
Error
(),
""
,
deleteTimeOutbox
,
mail
.
ID
)
fmt
.
Printf
(
"MailgunResp err : %s"
,
err
.
Error
())
alertAdmin
(
" Mailgun Error
\n
"
+
err
.
Error
())
}
...
...
@@ -415,7 +417,6 @@ func worker(i int) {
fmt
.
Printf
(
"Email sent ID: %s Resp: %s
\n
"
,
id
,
MailgunResp
)
}
//sendMessage(mg, sender, subject, body, recipient, cc)
mailSentTimeMailgun
:=
time
.
Now
()
.
In
(
loc
)
.
String
()
/**
* add the email as new document in "SENT ITEMS" DB
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment