Skip to content

Commit ebab1ae

Browse files
committed
feat(user): enable alumni email autoresponder
1 parent 9704a3c commit ebab1ae

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

compiler_admin/commands/user/alumni.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def alumni(args: Namespace) -> int:
3434
return RESULT_FAILURE
3535

3636
if getattr(args, "force", False) is False:
37-
cont = input(f"Convert account to alumni for {account}? (Y/n)")
37+
cont = input(f"Convert account to alumni: {account}? (Y/n) ")
3838
if not cont.lower().startswith("y"):
3939
print("Aborting conversion.")
4040
return RESULT_SUCCESS
@@ -87,4 +87,30 @@ def alumni(args: Namespace) -> int:
8787
)
8888
res += CallGAMCommand(command)
8989

90+
print("Turning on email autoresponder")
91+
# https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Gmail-Send-As-Signature-Vacation#manage-vacation
92+
message = (
93+
"Thank you for contacting Compiler. This inbox is no longer actively monitored.<br /><br />"
94+
+ f"Please reach out to {USER_HELLO} if you need to get a hold of us."
95+
)
96+
command = (
97+
"user",
98+
account,
99+
"vacation",
100+
"true",
101+
"subject",
102+
"[This inbox is no longer active]",
103+
"message",
104+
message,
105+
"contactsonly",
106+
"false",
107+
"domainonly",
108+
"false",
109+
"start",
110+
"Started",
111+
"end",
112+
"2999-12-31",
113+
)
114+
res += CallGAMCommand(command)
115+
90116
return res

0 commit comments

Comments
 (0)