Invalid value for ByteString error when calling gmail send API with base64 encoded < or>

后端 未结 5 1389
南笙
南笙 2021-01-03 22:07

Really stuck on this one and pulling my hair out trying to figure out what to do, searched everywhere and tried everything but still stuck. Any help is much appreciated.

5条回答
  •  没有蜡笔的小新
    2021-01-03 22:45

    In Google Apps Script following fixes the issue

    var draftBody = Utilities.base64EncodeWebSafe(raw);
    

    Don't use var draftBody = Utilities.base64Encode(raw);

提交回复
热议问题