mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-07 19:35:34 +08:00
If this is *not* done, then the decoded body will already be considered to be encoded, e.g.: ``` pry(main)> puts part Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64 PGh0bWw+PGhlYWQ+PC9oZWFkPjxib2R5Pjxicj48YnI+PGRpdiBjbGFzcz0i cHJvdG9ubWFpbF9zaWduYXR1cmVfYmxvY2stdXNlciI+PC9kaXY+PGJyPjxi cj5TZW50IGZyb20gPGEgdGFyZ2V0PSJfYmxhbmsiIGhyZWY9Imh0dHBzOi8v cHJvdG9uLm1lL21haWwvaG9tZSIgcmVsPSJub3JlZmVycmVyIj5Qcm90b24g TWFpbDwvYT4gZm9yIEFuZHJvaWQuPC9ib2R5PjwvaHRtbD4= pry(main)> part.body = part.body.decoded => "<html><head></head><body><br><br><div class=\"protonmail_signature_block-user\"></div><br><br>Sent from <a target=\"_blank\" href=\"https://proton.me/mail/home\" rel=\"noreferrer\">Proton Mail</a> for Android.</body></html>" pry(main)> puts part Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64 htmlhead/headbodybrbrdivclassprotonmailsignatureblockuser/di vbrbrSentfromatargetblankhrefhttps//protonme/mail/homerelnor eferrerProtonMail/aforAndroid/body/htmk= ``` Clearing the CTE indicates to the Mail gem that the content needs to be encoded if necessary. |
||
|---|---|---|
| .. | ||
| authentication_results.rb | ||
| build_email_helper.rb | ||
| cleaner.rb | ||
| message_builder.rb | ||
| message_id_service.rb | ||
| poller.rb | ||
| processor.rb | ||
| receiver.rb | ||
| renderer.rb | ||
| sender.rb | ||
| styles.rb | ||
| validator.rb | ||