#8460 allow sending already-formatted message

v1.14.0
closed
None
General
2022-09-23
2022-09-07
No

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.

Discussion

  • Dillon Walls - 2022-09-07

    Progress on: dw/8460

    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
  • Dillon Walls - 2022-09-07
    • status: in-progress --> review
     
  • Dillon Walls - 2022-09-07
    • summary: add task to allow sending already-formatted message --> allow sending already-formatted message
    • Description has changed:

    Diff:

    --- 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.
    
     
  • Dave Brondsema

    Dave Brondsema - 2022-09-08
    • status: review --> open
    • assigned_to: Dillon Walls
    • Reviewer: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2022-09-08
    • Maybe send_raw for the name?
    • @task decorator would be good to mark it as a task, and make it more easily callable as one
     
  • Dillon Walls - 2022-09-09
    • I like send_raw -- renamed.
    • 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.
     
  • Dillon Walls - 2022-09-09
    • status: open --> review
     
  • Dave Brondsema

    Dave Brondsema - 2022-09-12
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2022-09-23
    • Milestone: unreleased --> v1.14.0
     

Log in to post a comment.