We would like to be able to just send an email with all of the content/headers already determined. This would decouple the "sendmail" logic from the "allura" logic a little bit.
I'm not in love with the minor name changes I have made here
- SMTPClient.send - There is already a SMTPClient.sendmail which performs a decent amount of allura specific logic like building headers and computing references. So I added this simpler method that literally just sends the message and retries. The existing sendmail method now also leverages this new send method to actually transmit the message. So that's nice. But the names are all so similar.
Last edit: Dillon Walls 2022-09-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -1 +1 @@-We would like to be able to just add an email to the task queue with all of the content/headers already determined. This would decouple the mail logic from the allura logic a little bit.+We would like to be able to just send an email with all of the content/headers already determined. This would decouple the "sendmail" logic from the "allura" logic a little bit.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, the commit message is misleading by referencing task, I have force-pushed with a new message. I didn't intend for send_raw to be a @task, but instead something that a task could call. I moved the task logic elsewhere; into our override code (in FC). However! if putting the task here makes sense, which I think it could, I am more than happy to move things around.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Progress on: dw/8460
I'm not in love with the minor name changes I have made here
-
SMTPClient.send
- There is already aSMTPClient.sendmail
which performs a decent amount of allura specific logic like building headers and computing references. So I added this simpler method that literally just sends the message and retries. The existingsendmail
method now also leverages this newsend
method to actually transmit the message. So that's nice. But the names are all so similar.Last edit: Dillon Walls 2022-09-07
Diff:
send_raw
for the name?@task
decorator would be good to mark it as a task, and make it more easily callable as onesend_raw
-- renamed.send_raw
to be a@task
, but instead something that a task could call. I moved the task logic elsewhere; into our override code (in FC). However! if putting the task here makes sense, which I think it could, I am more than happy to move things around.