OS X 10.11.6
1.0.20
--
Bug?
I get this error whenever I send an email:
Your message successfully sent; however, we had trouble saving your message, "Test email", to your Sent folder.
Message contains bare newlines
The emails do not show up in my sent folder in Nylas, or on Fastmail's web interface.
No
I am using fastmail
No, applies to all messages.
--
Feature Request?
...
Hi @lapistola, we've seen this error happen as well. Does it happen repeatedly for you / for all messages you send?
Yes, ever single one.
Interesting. Have you tried connecting and sending from any accounts other than your Fastmail account? Curious if that's a specific factor in this issue.
Looks like it works fine on my Gmail
I am seeing this issue with a Gmail account and no sent mails since the 31st jan until this afternoon are showing!
Seeing this too, with Fastmail.
I'm having the same issue with Nylas Mail and Fastmail / Gmail.
Here's what I can see:
Client Tasks
EnsureMessageInSentFolderTask (ID: da6c) SUCCESS (PROCESSING REMOTE)
Provider Syncback Requests
EnsureMessageInSentFolder: FAILED - {"messageId":"85d6......","sentPerRecipient":false}
Interestingly:
Could this happen because of a timing issue?
Because of a high ping for example, Fastmail infrastructure would be able to catch-up, before Nylas Mail is able to process the request, thus the error message would never appear. Given that the message doesn't appear all the time, I'd suggest that my changing internet connectivity has an impact on whether the request would succeed or not.
Hello, I have the same problem with my Gmail account and my Fastmail account
The issue persists on Nylas Mail 2.0.10
"remoteError": {
"stack": "Error\n at new APIError (/src/flux/errors.es6:57:19)\n at _actions2.default.didReceiveSyncbackRequestDeltas.listen.syncbackRequests (/src/flux/syncback-task-api-request.es6:30:25)\n at EventEmitter.eventHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:36:22)\n at EventEmitter.emit (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/eventemitter3/index.js:72:35)\n at Function.trigger (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:52:26)\n at Function.functor [as didReceiveSyncbackRequestDeltas] (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/createAction.js:32:56)\n at DeltaProcessor._notifyOfSyncbackRequestDeltas (/src/services/delta-processor.es6:139:13)\n at /src/services/delta-processor.es6:77:12\n at next (<anonymous>)\n at step (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:191)\n at /Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:361\n at tryCatcher (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)\n at Promise._settlePromise (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)\n at Promise._settlePromiseCtx (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:604:10)\n at Async._drainQueue (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:138:12)\n at Async._drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)\n at Async.drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)",
"name": "APIError",
"error": {
"stack": "Error: Error: Message contains bare newlines\n at NylasError (errors.es6:1:8)\n at IMAPProtocolError (imap-errors.es6:22:5)\n at convertImapError (imap-errors.es6:140:15)\n at wrappedReject (imap-connection.es6:245:34)\n at imap-connection.es6:264:11\n at throw (<anonymous>)\n at step (imap-connection.es6:9:1)\n at imap-connection.es6:9:1\n at tryCatcher (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)\n at Promise._settlePromise (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)\n at Promise._settlePromise0 (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:612:10)\n at Promise._settlePromises (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:687:18)\n at Async._drainQueue (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:133:16)\n at Async._drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)\n at Async.drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)",
"message": "Error: Message contains bare newlines",
"userMessage": "IMAP protocol error. Please contact [email protected].",
"statusCode": 401,
"source": "protocol"
},
"body": {
"message": "Error: Message contains bare newlines"
},
"requestOptions": null,
"statusCode": 401,
"message": "Error: Message contains bare newlines"
},
I am also seeing the same issue with fastmail here.
I'm now on Nylas Mail Version 2.0.15, Mac OS X 10.12.4, Fastmail IMAP but the error persists: Your message successfully sent; however, we had trouble saving your message ....
at new APIError (/src/flux/errors.es6:57:19)
at _actions2.default.didReceiveSyncbackRequestDeltas.listen.syncbackRequests (/src/flux/syncback-task-api-request.es6:30:25)
at EventEmitter.eventHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:36:22)
at EventEmitter.emit (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/eventemitter3/index.js:72:35)
at Function.trigger (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:52:26)
at Function.functor [as didReceiveSyncbackRequestDeltas] (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/createAction.js:32:56)
at DeltaProcessor._notifyOfSyncbackRequestDeltas (/src/services/delta-processor.es6:139:13)
at /src/services/delta-processor.es6:77:12
at next (<anonymous>)
at step (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:191)
at /Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:361
at tryCatcher (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromiseCtx (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:604:10)
at Async._drainQueue (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:138:12)
at Async._drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)
at Async.drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)
To anyone having these issues and just wanting to try a temporary fix: the errors stop for me if I just add my Fastmail account as a normal IMAP account, not via the Fastmail integration.
@miloszfalinski if that's true, there must be something Fastmail specific, that prevents this from working. Here's what Nylas Mail uses to connect to Fastmail (source):
"imap_host": "imap.fastmail.com",
"imap_port": "993",
"imap_security": "SSL / TLS",
"imap_user_format": "email",
"smtp_host": "smtp.fastmail.com",
"smtp_port": "465",
"smtp_security": "SSL / TLS",
"smtp_user_format": "email"
Other than that, I've only found that Nylas Mail appears to strip the INBOX. prefix from Fastmail folders. In any case, there have been reports that this also happens with Gmail accounts so it would appear as though this is a general issue?
thanks for the info! we're looking into this one
@jstejada
Figured this one out! It has something to do with custom signatures.
Three users at my org are using Fastmail accounts. Before adding their custom HTML signatures, this error did not happen. Following adding the signature, it does. Did a new installation and tested this again, and it is the case only after the signature has been changed. I am including the custom signature that I use (that prompts the error):
https://gist.github.com/ryanleesipes/a18d37875f0ecf411f345961eb6686de
Messages that are not saved to the sent folder appear to have problems being archived. Gets a IMAP uid error. This is the error:
wow thanks for tracking that down!, yes the uid error is a separate one, we're also working on that one
I get the same error when sending emails from my one.com IMAP account. I just noticed that my "Sent" folder is listed as an ordinary folder, not where the Inbox and the others are. Is there any way to manually fix this?

We tried adding these as IMAP accounts and the problem persisted. (Addressing an earlier comment about it not happening with IMAP). Still think it has something to do with signatures.
Alright, I've been able to replicate this issue consistently thanks to @ryanleesipes and the tip with the signature. In some cases, a little \n sneaks into your signature. Let's try:
<p>Best,
<br>Franz</b>
If you're seeing this error, here's how you can verify whether this is the same issue:

"body":, this should reflect the content of your Email\nHere's how the body of the above email signature would look like:
"body":"<br><br><signature><p>Best,\n<br>Franz</p></signature>"
Let's get this fixed :+1:
_Side note: I noticed something else fishy. When I send an Email to myself, and this error occurs, the Email does not show up in the Fastmail outbox (because it couldn't be saved), however it shows up in the Nylas Mail / Fastmail Inbox. On the other hand, Emails with a Signature that does not cause this error, show up in the Fastmail outbox but don't show up in the Nylas Inbox._
thanks for the extra details! Looking into this!
I have this problem with my Fastmail account too.
@jstejada any updates? Tracked this down?
I think I have this problem. Having added two IMAP accounts they don't have a "Sent" folder. Every time I send I get the error. The IMAP accounts are hosted at Rackspace (if that matters)
I'm getting this error on replies only, not on composing new messages.
This is on a self-hosted IMAP/SMTP (Cyrus/Postfix) server, with Nylas-Mail 2.0 on Ubuntu 14.04.
But in both cases (compose and reply), it is not saving to my Sent folder, yet the message is being sent!
Addendum to above - after restarting Nylas, I found it created/used a "Sent Items" folder and put sent mail there.. but I cannot find configuration option to map the IMAP/Sent folder to be default instead of "Sent Items".
+1
This same error occurs w/ Windows 10 / Nylas 2.0.32 / Fastmail IMAP
+1
Getting this with OS X 10.12.1, Nylas 2.0.32, and Fastmail IMAP.
+1
Also getting this on Ubuntu 16.04, Nylas 2.0.32.
+1
Same in Windows 10 / Nylas 2.0.32, Fastmail IMAP.
+1
Same on Elementary OS Loki, Nylas 2.0.32, Fastmail IMAP.
+1 getting this on ubuntu 16.04, Nylas 2.0.32, Fastmail IMAP
Same here... Nylas is such a sexy email client, a real shame that there are so many outstanding bugs...
heres the log:
Error
at new APIError (/src/flux/errors.es6:57:19)
at _actions2.default.didReceiveSyncbackRequestDeltas.listen.syncbackRequests (/src/flux/syncback-task-api-request.es6:30:25)
at EventEmitter.eventHandler (/usr/share/nylas-mail/resources/app.asar/node_modules/reflux/src/PublisherMethods.js:36:22)
at EventEmitter.emit (/usr/share/nylas-mail/resources/app.asar/node_modules/eventemitter3/index.js:72:35)
at Function.trigger (/usr/share/nylas-mail/resources/app.asar/node_modules/reflux/src/PublisherMethods.js:52:26)
at Function.functor [as didReceiveSyncbackRequestDeltas] (/usr/share/nylas-mail/resources/app.asar/node_modules/reflux/src/createAction.js:32:56)
at DeltaProcessor._notifyOfSyncbackRequestDeltas (/src/services/delta-processor.es6:139:13)
at /src/services/delta-processor.es6:77:12
at next (
at step (/usr/share/nylas-mail/resources/app.asar/src/services/delta-processor.js:35:191)
at /usr/share/nylas-mail/resources/app.asar/src/services/delta-processor.js:35:361
at tryCatcher (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromiseCtx (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/promise.js:604:10)
at Async._drainQueue (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/async.js:138:12)
at Async._drainQueues (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)
at Async.drainQueues (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)
Most helpful comment
I am also seeing the same issue with fastmail here.