mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-23 19:07:33 +00:00
Fixed Kumar's address and renamed variable
Fixed Kumar's address and renamed variable
This commit is contained in:
parent
58cbc7b42a
commit
7dc8039c32
@ -16,14 +16,14 @@ gmail.inbox.find(:unread, from: 'kumar.a@example.com').each do |email|
|
|||||||
if email.body[KEYWORDS_REGEX]
|
if email.body[KEYWORDS_REGEX]
|
||||||
# Restore DB and send a reply
|
# Restore DB and send a reply
|
||||||
email.label('Database fixes')
|
email.label('Database fixes')
|
||||||
reply = reply_to(email.subject)
|
reply = create_reply(email.subject)
|
||||||
gmail.deliver(reply)
|
gmail.deliver(reply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def reply_to(subject)
|
def create_reply(subject)
|
||||||
gmail.compose do
|
gmail.compose do
|
||||||
to "email@example.com"
|
to "kumar.a@example.com"
|
||||||
subject "RE: #{subject}"
|
subject "RE: #{subject}"
|
||||||
body "No problem. I've fixed it. \n\n Please be careful next time."
|
body "No problem. I've fixed it. \n\n Please be careful next time."
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user