Skip to content
Browse files

In "dev mode" email, be more explicit.

Make it clear that nothing is being sent and point users to MAIL_URL.

Fixes #1196.
  • Loading branch information...
1 parent 2b36c8b commit 39e3f1ee1af9d7de2a9cf6a779a53f80d6430c4c @glasser glasser committed
Showing with 4 additions and 0 deletions.
  1. +2 −0 packages/email/email.js
  2. +2 −0 packages/email/email_tests.js
View
2 packages/email/email.js
@@ -78,6 +78,8 @@ var devModeSend = function (mc) {
// This approach does not prevent other writers to stdout from interleaving.
stream.write("====== BEGIN MAIL #" + devmode_mail_id + " ======\n");
+ stream.write("(Mail not sent; to enable sending, set the MAIL_URL " +
+ "environment variable.)\n");
mc.streamMessage();
mc.pipe(stream, {end: false});
var future = new Future;
View
2 packages/email/email_tests.js
@@ -20,6 +20,8 @@ Tinytest.add("email - dev mode smoke test", function (test) {
// XXX brittle if mailcomposer changes header order, etc
test.equal(stream.getContentsAsString("utf8"),
"====== BEGIN MAIL #0 ======\n" +
+ "(Mail not sent; to enable sending, set the MAIL_URL " +
+ "environment variable.)\n" +
"MIME-Version: 1.0\r\n" +
"X-Meteor-Test: a custom header\r\n" +
"From: foo@example.com\r\n" +

0 comments on commit 39e3f1e

Please sign in to comment.
Something went wrong with that request. Please try again.