ferruzzi commented on code in PR #55308:
URL: https://github.com/apache/airflow/pull/55308#discussion_r2337364235


##########
providers/smtp/src/airflow/providers/smtp/notifications/smtp.py:
##########
@@ -153,5 +162,25 @@ def notify(self, context):
                 custom_headers=self.custom_headers,
             )
 
+    async def async_notify(self, context: Context):
+        """Send a email via smtp server (async)."""
+        async with self.hook as smtp:
+            # TODO:  use_templates is temporary until templating on the 
Triggerer is sorted out.
+            #   Once that is done, we can remove that flag.
+            self._build_email_content(smtp, context, use_templates=False)

Review Comment:
   > With recent templating-related changes merged in, should we remove this 
flag?
   
   I'll rebase and test, but yeah I think we can drop that now. 
   
   
   >  Also, just a nit: maybe we should consider renaming smtp to hook or 
smtp_hook?
   
   That's fair.  It was called `smtp` and I didn't want to rename it, but then 
I went and did a complete refactor on the tests so I guess I gave up my 
"minimal impact" justification :sweat_smile:    I'll make the change, thanks 
for pointing it out.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to