@@ -39,7 +39,7 @@ def send_new_group_create_notification(auth_user, date_time, new_group, member_l
3939 reason = new_group .description ,
4040 needsAccessApprove = new_group .needsAccessApprove ,
4141 )
42- general .emailSES (MAIL_APPROVER_GROUPS , subject , body )
42+ general .email_via_smtp (MAIL_APPROVER_GROUPS , subject , body )
4343 logger .debug ("Email sent for " + subject + " to " + str (MAIL_APPROVER_GROUPS ))
4444
4545
@@ -55,7 +55,7 @@ def send_new_group_approved_notification(group, group_id, initial_member_names):
5555 destination .append (group .requester .email )
5656 # TODO send a mail to initial members
5757 logger .debug (group_id + " -- Approved email sent to - " + str (destination ))
58- general .emailSES (destination , subject , body )
58+ general .email_via_smtp (destination , subject , body )
5959
6060
6161def send_membership_accepted_notification (user , group , membership ):
@@ -69,7 +69,7 @@ def send_membership_accepted_notification(user, group, membership):
6969 destination = []
7070 destination .append (membership .requested_by .email )
7171 destination .append (user .email )
72- general .emailSES (destination , subject , body )
72+ general .email_via_smtp (destination , subject , body )
7373
7474
7575def send_mulitple_membership_accepted_notification (all_user_emails , group_name , membership ):
@@ -84,7 +84,7 @@ def send_mulitple_membership_accepted_notification(all_user_emails, group_name,
8484 destination = []
8585 destination .append (membership .requested_by .email )
8686 destination .append (each_user_email )
87- general .emailSES (destination , subject , body )
87+ general .email_via_smtp (destination , subject , body )
8888
8989
9090def generateGroupMemberTable (memberList ):
@@ -100,7 +100,7 @@ def send_group_owners_update_mail(destination, group_name, updated_by):
100100 group_name , ", " .join (destination ), updated_by
101101 )
102102
103- general .emailSES (destination , subject , body )
103+ general .email_via_smtp (destination , subject , body )
104104 except Exception as e :
105105 logger .exception (str (e ))
106106 logger .error ("Something when wrong while sending Email." )
@@ -120,7 +120,7 @@ def send_group_access_add_email(
120120 ),
121121 )
122122 subject = GROUP_ACCESS_ADDED_SUBJECT .format (group_name = group_name )
123- general .emailSES (destination , subject , body )
123+ general .email_via_smtp (destination , subject , body )
124124 return ""
125125
126126
@@ -138,7 +138,7 @@ def send_revoke_failure_mail(
138138 access_tag = access_tag ,
139139 )
140140
141- general .emailSES (targets , subject , body )
141+ general .email_via_smtp (targets , subject , body )
142142 except Exception as e :
143143 logger .error ("Something when wrong while sending membership revoke email" )
144144 logger .exception (str (e ))
@@ -159,7 +159,7 @@ def send_mail_for_request_decline(
159159 approver = request .user .username ,
160160 reason = reason ,
161161 )
162- general .emailSES (destination , subject , body )
162+ general .email_via_smtp (destination , subject , body )
163163 logger .debug ("Email sent for " + subject + " to " + str (destination ))
164164
165165
@@ -173,7 +173,7 @@ def send_mail_for_request_granted_failure(user, approver, access_type, request_i
173173 str (user .email ),
174174 request_id ,
175175 )
176- general .emailSES (destination , subject , body )
176+ general .email_via_smtp (destination , subject , body )
177177 logger .debug ("Email sent for " + subject + " to " + str (destination ))
178178
179179
@@ -199,7 +199,7 @@ def send_mail_for_member_approval(userEmail, requester, group_name, reason):
199199 reason ,
200200 ),
201201 )
202- general .emailSES (destination , subject , body )
202+ general .email_via_smtp (destination , subject , body )
203203
204204
205205def generate_user_add_to_group_email_body (
@@ -223,7 +223,7 @@ def send_mail_for_access_grant_failed(
223223 subject = str ("Access Grant Failed - " ) + access_type .upper ()
224224 body = ACCESS_GRANT_FAILED_MESSAGE .format (user_email , request_id )
225225 body = body + "Failure Reason - " + message
226- general .emailSES (destination , subject , body )
226+ general .email_via_smtp (destination , subject , body )
227227
228228
229229def send_group_access_declined (
@@ -240,7 +240,7 @@ def send_group_access_declined(
240240 )
241241
242242 subject = subject = "Declined Request " + request_id
243- general .emailSES (destination , subject , body )
243+ general .email_via_smtp (destination , subject , body )
244244
245245
246246def send_accept_group_access_failed (destination , request_id , error ):
@@ -250,7 +250,7 @@ def send_accept_group_access_failed(destination, request_id, error):
250250 )
251251
252252 subject = subject = "Failed Request " + request_id
253- general .emailSES (destination , subject , body )
253+ general .email_via_smtp (destination , subject , body )
254254 except Exception as e :
255255 logger .exception (str (e ))
256256 logger .error ("Something when wrong while sending Email." )
@@ -263,7 +263,7 @@ def send_decline_group_access_failed(destination, request_id, error):
263263 )
264264
265265 subject = subject = "Declined Failed Request " + request_id
266- general .emailSES (destination , subject , body )
266+ general .email_via_smtp (destination , subject , body )
267267 except Exception as e :
268268 logger .exception (str (e ))
269269 logger .error ("Something when wrong while sending Email." )
@@ -278,5 +278,5 @@ def send_mail_for_request_resolve(auth_user, access_type, request_id):
278278 request_id = request_id ,
279279 access_type = access_type ,
280280 )
281- general .emailSES (destination , subject , body )
281+ general .email_via_smtp (destination , subject , body )
282282 logger .debug ("Email sent for " + subject + " to " + str (destination ))
0 commit comments