Skip to content

Commit

Permalink
fix: Message-Id -> Message-ID, fixed send gmail guide (free vs paid),…
Browse files Browse the repository at this point in the history
… home page simplified, enable bounces for all users
  • Loading branch information
titanism committed Jul 31, 2023
1 parent 4fed3e0 commit cbfd483
Show file tree
Hide file tree
Showing 39 changed files with 411 additions and 340 deletions.
2 changes: 1 addition & 1 deletion app/models/emails.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Emails.pre('validate', function (next) {
//
Emails.pre('validate', function (next) {
try {
// TODO: validate Message-Id header to RFC spec (even though we set it if not exists)
// TODO: validate Message-ID header to RFC spec (even though we set it if not exists)
// <https://stackoverflow.com/a/4031705>

// TODO: ensure that From header exists with at least one valid address (RFC 5322)
Expand Down
6 changes: 3 additions & 3 deletions app/views/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ You should either pass the single option of `raw` with your raw full email inclu
| `attachments` | No | Array | An array of attachment objects (see [Nodemailer's common fields](https://nodemailer.com/message/#common-fields)). |
| `sender` | No | String | The email address for the "Sender" header (see [Nodemailer's more advanced fields](https://nodemailer.com/message/#more-advanced-fields)). |
| `replyTo` | No | String | The email address for the "Reply-To" header. |
| `inReplyTo` | No | String | The Message-Id the message is in reply to. |
| `references` | No | String or Array | Space separated list or an Array of Message-Id's. |
| `inReplyTo` | No | String | The Message-ID the message is in reply to. |
| `references` | No | String or Array | Space separated list or an Array of Message-ID's. |
| `attachDataUrls` | No | Boolean | If `true` then converts `data:` images in the HTML content of the message to embedded attachments. |
| `watchHtml` | No | String | An Apple Watch specific HTML version of the message ([according to the Nodemailer docs](https://nodemailer.com/message/#content-options]), the latest watches do not require this to be set). |
| `amp` | No | String | An AMP4EMAIL specific HTML version of the message (see [Nodemailer's example](https://nodemailer.com/message/#amp-example)). |
Expand All @@ -213,7 +213,7 @@ You should either pass the single option of `raw` with your raw full email inclu
| `textEncoding` | No | String | Encoding that is forced to be used for text values (either `"quoted-printable"` or `"base64"`). The default value is the closest value detected (for ASCII use `"quoted-printable"`). |
| `priority` | No | String | Priority level for the email (can either be `"high"`, `"normal"` (default), or `"low"`). Note that a value of `"normal"` does not set a priority header (this is the default behavior). If a value of `"high"` or `"low"` is set, then the `X-Priority`, `X-MSMail-Priority`, and `Importance` headers [will be set accordingly](https://github.com/nodemailer/nodemailer/blob/19fce2dc4dcb83224acaf1cfc890d08126309594/lib/mailer/mail-message.js#L222-L240). |
| `headers` | No | Object or Array | An Object or an Array of additional header fields to set (see [Nodemailer's custom headers](https://nodemailer.com/message/custom-headers/)). |
| `messageId` | No | String | An optional Message-Id value for the "Message-Id" header (a default value will be automatically created if not set – note that the value should [adhere to the RFC2822 specification](https://stackoverflow.com/a/4031705)). |
| `messageId` | No | String | An optional Message-ID value for the "Message-ID" header (a default value will be automatically created if not set – note that the value should [adhere to the RFC2822 specification](https://stackoverflow.com/a/4031705)). |
| `date` | No | String or Date | An optional Date value that will be used if the Date header is missing after parsing, otherwise the current UTC string will be used if not set. The date header cannot be more than 30 days in advance of the current time. |
| `list` | No | Object | An optional Object of `List-*` headers (see [Nodemailer's list headers](https://nodemailer.com/message/list-headers/)). |

Expand Down
2 changes: 1 addition & 1 deletion app/views/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ We plan to offer this feature in the near future.

## Why am I not receiving my test emails

If you're sending a test email to yourself, then it may not show up in your inbox because it has the same "Message-Id" header.
If you're sending a test email to yourself, then it may not show up in your inbox because it has the same "Message-ID" header.

This is a widely known issue, and also affects services such as Gmail. <a href="https://support.google.com/a/answer/1703601">Here is the official Gmail answer regarding this issue</a>.

Expand Down
48 changes: 18 additions & 30 deletions app/views/guides/send-mail-as-using-gmail.pug
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
extends ../layout

block body
//-.
if !isBot(ctx.get('User-Agent'))
.fixed-bottom.text-center.d-print-none
.bg-dark.p-2.border-top.border-themed
ul.list-inline.mb-0
li.list-inline-item
a.btn.btn-lg.btn-light(href="#quick-video-guide")
i.fab.fa-youtube.text-danger
= " "
= t("Video")
li.list-inline-item.d-none.d-md-inline-block: i.fa.fa-angle-right.align-middle.text-white
li.list-inline-item
a.btn.btn-lg.btn-light(href="#step-by-step-instructions")
span.badge.badge-pill.mr-1.badge-success
i.fa.fa-list-ol
= t("Steps")
if !isBot(ctx.get('User-Agent'))
.fixed-bottom.text-center.d-print-none.d-lg-none
.bg-dark.p-2.border-top.border-themed
ul.list-inline.mb-0
li.list-inline-item
a.btn.btn-light.btn-sm(href="#step-by-step-instructions")
span.badge.badge-pill.mr-1.badge-success
i.fa.fa-list-ol
= t("For Paid Plans")
li.list-inline-item
a.btn.btn-light.btn-sm(href="#legacy-free-guide")
span.badge.badge-pill.mr-1.badge-danger
i.fa.fa-list-ol
= t("For Free Plan")
.container.py-3.py-md-4.py-lg-5
.row
.col-12.text-center
Expand Down Expand Up @@ -62,36 +60,26 @@ block body
if isBot(ctx.get("User-Agent"))
= t("Step by Step Instructions")
else
span.d-none.d-md-inline
= t("Step by Step Instructions")
span.d-inline.d-md-none
= t("Steps")
= t("For Paid Plans")
.card-body.markdown-body
!= sendMailAsContent
#legacy-free-guide.col-sm-12.col-md-12.col-lg-6.mt-5.mt-lg-0
.card.position-relative
.position-absolute.w-100.text-right
.position-absolute.w-100.text-right.d-none.d-md-inline
span.badge.badge-pill.badge-danger.mt-3.mr-3.text-uppercase
!= t("Deprecated")
h2.h5.card-header.text-center
if isBot(ctx.get("User-Agent"))
!= t("Legacy Free Guide")
else
span.d-none.d-md-inline
!= t("Legacy Free Guide")
span.d-inline.d-md-none
!= t("Free")
!= t("For Free Plan")
.card-body.markdown-body
.alert.alert-danger
i.fa.fa-stop-circle.font-weight-bold
= " "
strong= t("Important:")
= " "
!= t('This legacy free guide is deprecated as of May 2023 since <a class="alert-link" href="%s">we now support outbound SMTP</a>. If you use the guide below, then <a class="alert-link" href="%s">this will cause your outbound email</a> to say <span class="notranslate text-danger font-weight-bold">"via forwardemail dot net"</span> in Gmail.', l("/faq#do-you-support-sending-email-with-smtp"), l("/faq#can-i-remove-the-via-forwardemail-dot-net-in-gmail"))
= " "
strong.text-decoration-underline!= t("You should instead use the step by step instructions labelled:")
= " "
span.badge.badge-pill.badge-success.text-uppercase= "New"
!= t('This guide works, however we deprecated it as of May 2023 since <a class="alert-link" href="%s">we now support outbound SMTP</a> on our paid plans. If you use the guide below, then <a class="alert-link" href="%s">this will cause your outbound email</a> to say <span class="notranslate text-danger font-weight-bold">"via forwardemail dot net"</span> in Gmail.', l("/faq#do-you-support-sending-email-with-smtp"), l("/faq#can-i-remove-the-via-forwardemail-dot-net-in-gmail"))
.mx-auto.lazyframe.border.border-themed(
data-vendor="youtube_nocookie",
title=t("How to Send Mail As using Gmail"),
Expand Down
Loading

0 comments on commit cbfd483

Please sign in to comment.