etkin / gmail-delay-send

Automatically exported from code.google.com/p/gmail-delay-send
0 stars 0 forks source link

messages composed on iPhone do not send #192

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
=======================================
=== PLEASE READ BEFORE FILING ISSUE:
https://code.google.com/p/gmail-delay-send/wiki/GmailDelaySendDebugging_8
=======================================

What steps will reproduce the problem?
1. Compose a message on iPhone
2. Use the same characters which are successful on macbook/chrome/gmail and @ 
as delimiter
2. To save as draft select "cancel" and then "save as draft"
3. Resulting error message:

-- Error:Error: Gmail Delay Send failed to connect to one of the Google 
Services. This is OK if it happens infrequently, the script will run again in a 
few minutes. See here to avoid receiving these notifications: 
https://code.google.com/p/gmail-delay-send/wiki/GmailDelaySendOptions_8#Error_No
tifications. Function being called: function () { GmailApp.sendEmail(to, 
subject, body, {htmlBody:htmlBody, cc:cc, bcc:bcc, from:from, 
attachments:attach, name:name}); } .Error message: Exception: Invalid argument: 
Michael@xyz.com --Stack:    at Services (GmailDelaySendWeb):209 (executeCommand) 
at Services (GmailDelaySendWeb):107 (serviceSendEmailMessage) at Mail 
(GmailDelaySendWeb):66 (sendMessage) at Main (GmailDelaySendWeb):160 
(tryToSendMessage) at Main (GmailDelaySendWeb):188 (processThread) at Main 
(GmailDelaySendWeb):206 (processThreads) at Main (GmailDelaySendWeb):24 (main)

Note: Everything working great for me otherwise.  Just having issues saving 
mobile drafts that work.  

After composing an apparently well formed message on my mobile device, iPhone 6 
with iOS8, the message does appear in my drafts folder right along side drafts 
composed with the exact same characters via the chrome browser on my laptop. 
The drafts composed on my laptop succeed. Those composed on my iPhone fail. 

If I open a draft which has been composed on my iphone, and alter it in any way 
(e.g. add a space at the end of the message), causing it to resave, it then 
succeeds. This leads me to suspect that something in the way the message is 
encoded, which isn't visible to me, is different between the two. 

Version: I installed a few days ago for the first time, so using the current 
version (as of 2015 0302 2222).  Not sure how to look up the version number. 

Please provide any additional information below.

Original issue reported on code.google.com by mich...@startupweekend.org on 3 Mar 2015 at 6:26

GoogleCodeExporter commented 9 years ago
Hello Michael!

Thanks for the detailed report! From the error message it appears as though 
your IPhone client is composing a message to go to the address 
"Michael@xyz.com" which Gmail thinks is an invalid address.

I wonder if we could try this (more information how to do these steps here: 
https://code.google.com/p/gmail-delay-send/wiki/GmailDelaySendDebugging_8)

* Turn off the 'enable' button on the options page (essentially turning off the 
script from running automaticaly).
* Turn on debugging
* Compose a message on phone
* Force a run once from webpage (probably can do this easier via computer)
* Open draft from computer.
* Add space to end of message
* Force run once

Attach the debug report from the two runs (presumably the first one fails and 
the second succeeds) to the bug report.

Then we can get an idea of the differences.

Thanks,
-Blair

Original comment by blairk...@gmail.com on 4 Mar 2015 at 1:32

GoogleCodeExporter commented 9 years ago
Hi Blair!  Thanks for the quick response. I love your script and in using it 
successfully from the laptop. 

I manually changed the email address I my original post thinking I was 
obscuring it. I suppose that's silly as my address is visible elsewhere here. 
Haha. Sorry for throwing you off the scent. 

I'll execute a debug report later today 

Original comment by mich...@startupweekend.org on 4 Mar 2015 at 3:05

GoogleCodeExporter commented 9 years ago
I think I've followed your steps precisely.
Here's the steps I've taken, and I've attached the debug logs and error message 
as plain text files.

### Using Chrome on Mac Laptop

- Disable Gmail Delay Send script
    - Save Preferences
    - Note success dialogue and reload page 
- Enable debug logs
    - Save Preferences
    - Note success dialogue and reload page 

### Using the native iPhone Mail app

- Compose test email
- Select "Cancel"
- Select "Save Draft"
- Confirm that draft has saved to server by peeking at drafts folder via iPhone 
and noting that it pulls it back down to that folder from the server.

### Using Chrome on Mac Laptop

- Run Gmail Delay Send now
    - Note success dialogue and reload page 
    - This generates an error message and a debug report
- Access saved draft via Chrome browser on laptop, edit message simply by added 
a space at the end of the body,
- Note that this edit causes the draft to update/save again
- Run Gmail Delay Send now
    - Note success dialogue and reload page 
    - This generates a successful email receipt and a debug report
- Confirmed that email was received by the recipient account

### Additional Notes: 

- The first time I make any edit to the drafted email in Chrome browser on the 
laptop (the email which was composed on iOS Mail), I see near the bottom, next 
to the trash can icon where the "saving..." status normally appears, the words 
"Plain Text." This disappears quickly and moves on to displaying the statuses 
"Saving..." and "Saved."  I wonder if there is some significance to this, and 
suspect it aligns with my theory that this is an encoding issue.  

- When I compose an email using the iOS version of the Chrome browser app on my 
iPhone and save it as a draft, it succeeds. So the issue appears to be limited 
to the native iOS Mail app.

Original comment by mich...@startupweekend.org on 4 Mar 2015 at 4:51

Attachments:

GoogleCodeExporter commented 9 years ago
Huh! totally baffling!

From debug_01 I see this in the log:
Wed Mar 04 08:35:01 PST 2015 INFO: == Sending mail ==
Wed Mar 04 08:35:01 PST 2015 INFO: To: "michael@michaelryannorton.com"
Wed Mar 04 08:35:01 PST 2015 INFO: Subject: subject line @now
Wed Mar 04 08:35:01 PST 2015 INFO: Body length: 33
Wed Mar 04 08:35:01 PST 2015 INFO: HTML body length: Empty
Wed Mar 04 08:35:01 PST 2015 INFO: CC:
Wed Mar 04 08:35:01 PST 2015 INFO: BCC:
Wed Mar 04 08:35:01 PST 2015 INFO: From: Michael@up.co
Wed Mar 04 08:35:01 PST 2015 INFO: Attachments length: 0
Wed Mar 04 08:35:01 PST 2015 INFO: Name: Michael Norton
Wed Mar 04 08:35:01 PST 2015 INFO: ==================

Then when we try to send SendMail complains that "Michael@up.co" is an invalid 
argument.,

From debug_02 I see the exact same thing:
Wed Mar 04 08:39:57 PST 2015 INFO: == Sending mail ==
Wed Mar 04 08:39:57 PST 2015 INFO: To: "michael@michaelryannorton.com"
Wed Mar 04 08:39:57 PST 2015 INFO: Subject: subject line @now
Wed Mar 04 08:39:57 PST 2015 INFO: Body length: 33
Wed Mar 04 08:39:57 PST 2015 INFO: HTML body length: Empty
Wed Mar 04 08:39:57 PST 2015 INFO: CC:
Wed Mar 04 08:39:57 PST 2015 INFO: BCC:
Wed Mar 04 08:39:57 PST 2015 INFO: From: michael@up.co
Wed Mar 04 08:39:57 PST 2015 INFO: Attachments length: 0
Wed Mar 04 08:39:57 PST 2015 INFO: Name: Michael Norton
Wed Mar 04 08:39:57 PST 2015 INFO: ==================

But sending then works fine.

Good idea about the text versus HTML but both appear to still be text emails 
(in the debug we see an empty HTML body length).

Do you think you could try again from the native iphone client and sent to a 
different destination address? Feel free to use my address blairkutz at gmail.

Original comment by blairk...@gmail.com on 6 Mar 2015 at 1:29