Details
Additional hardening:
- Always use a dedicated
no-reply@address insetFrom(); put the caller's address only inReply-To. Never reuse$config->getContactEmail()as the From for user-initiated messages. - For the logged-in "share" flow, verify the caller's email has been confirmed, and rate-limit by user id and by IP.
- Drop the non-
contactFormbranch entirely if no legitimate unauthenticated UI caller remains. - Add a visible "user-submitted message via our site" banner to the email body so recipients can distinguish these from first-party communications.