github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2022-11-09 09:05 am

[dreamwidth/dreamwidth] afa02c: final (for now) round of tellafriend fixes (#3005)

Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: afa02c2b13dd3a5bb7205d4c985f9b159b6845cd https://github.com/dreamwidth/dreamwidth/commit/afa02c2b13dd3a5bb7205d4c985f9b159b6845cd Author: Jen kareila@dreamwidth.org Date: 2022-11-09 (Wed, 09 Nov 2022)

Changed paths: M cgi-bin/DW/Controller/Tools.pm M views/tools/tellafriend.tt M views/tools/tellafriend.tt.text

Log Message:


final (for now) round of tellafriend fixes (#3005)

  • hush uninitialized value warnings related to empty message body

  • send from dw_null, reply-to user's own email

Currently, the header of the generated email looks like:

From: "[[username]] via [[sitename]]" <[[user's email]]>

This updates it to come from $LJ::BOGUS_EMAIL, with the user's email as a reply-to:

From: "[[username]] via [[sitename]]" <[[dw_null@site]]> Reply-To: "[[username]]" <[[user's email]]>

This change also makes it more likely that the message will actually be delivered by SES.

Fixes #1866.

  • fix problem with $default_formdata being ignored

Since $r->post_args is never empty (it's a Hash::MultiValue object), let's use the value of $r->did_post instead.

  • update the form display to better reflect the actual email header

also displays the message subject, which was hidden before