Why does the GMail API strip the doctype and comments from outgoing messages? -


Gmail seems to exclude doctype and HTML comments from outgoing messages.

Repro

  • "Try it!"
  • Sign in with OAuth
  • Enter "userId" for: me
  • "raw" Enter the result of the following node script:
  • generMessage.js

      Var email = "From: 'me' \ r \ n" + "to : Bradvogel@outlook.com \ r \ n "+" Topic: Test DockType \ r \ n "+" Content-Type: Text / html; Charset = UTF-8 \ r \ n "+" \ r \ n "+ + "& lt ;; doctype html & gt;" + "& Lt; html & gt; & lt; body & gt; test & lt ;! - [if! Mso] & gt; hidden from Outlook !! - & Lt;! [Endif] -> gt; & lt; / body & gt; & lt; / html & gt; "; Var base64 = new buffer (email) .string ('base64'); Var websafeBase64 = base64.replace (/ \ // g, '_'). Replace (/ \ + / g, '-'); Console.log (websafeBase64);  

    actual

    When I see the raw message source of the email you received on Bradwogel @ Autcluk dot com, he comes without working or comments:

      to: bradvogel@outlook.com Subject: Test DockType Content-Type: Multipart / Optional; Border = 08 9e0102fc52abed0a04ff355038 --089e0102fc52abed0a04ff355038 Content-type: text / plain; Charset = UTF-8 test --089e0102fc52abed0a04ff355038 Content-type: text / html; Charset = UTF-8 & lt; Html & gt; & Lt; Body & gt; Trial & lt; / Body & gt; & Lt; / Html & gt; --089e0102fc52abed0a04ff355038--  

    Expected Results

    Focus on the methodology:

      from: bradvogel@outlook.com subject: Test Doctype Content-Type: Multipart / Alternative; Border = 08 9e0102fc52abed0a04ff355038 --089e0102fc52abed0a04ff355038 Content-type: text / plain; Charset = UTF-8 test --089e0102fc52abed0a04ff355038 Content-type: text / html; Charset = UTF-8 & lt ;! Doctype html & gt; & Lt; Html & gt; & Lt; Body & gt; Exam & lt ;! - [if! Mso] & gt; Hidden from Outlook & lt ;! - & lt ;! [Endif] - & gt; & Lt; / Body & gt; & Lt; / Html & gt; --089e0102fc52abed0a04ff355038--  

    Notes

    to send the same message through SMTP does protect the whole message.

    function and are essential for comments format Outlook and the APIs that my raw RFC 822 message appears Email for iOS mail and having it converted to text and multipart / alternative with HTML presentations , But has been snatched with important material.

    Do anyone know how to keep documents and comments in a message safe Gmail Message API?

    This is just an API design decision.

    filed their problem in Tracker

    Comments

    Popular posts from this blog

    java - org.apache.http.ProtocolException: Target host is not specified -

    java - Gradle dependencies: compile project by relative path -

    ruby on rails - Object doesn't support #inspect when used with .include -