1
votes

I am trying to set up a script that takes in email from an email address A.From within Gmail inbox B, the script opens up a new message, and sends the exact same message as was received from A, except the new message is being sent from B to another user C. So instead of being sent from A to C, the email is shown as being sent from A to B then from B to C. The script I have works perfectly, except there is one issue. The return path on the email address I sent from the script using GmailApp() is as follows:

Return-Path: [email protected]

The result of having this return path is causing the desired recipient not to receive the email being sent because it is being sent to their spam box instead of their inbox.

My question is this: Do the email sending functions in Google Apps Script send email from a third party email provider rather than from within the Gmail account of the user running the script? Is this supposed to be functionality of GmailApp() and MailApp()?

1

1 Answers

2
votes

Yes, you're correct. Currently the GmailApp and MailApp services do not send via the user's account. There's a filed, open enhancement request on the issue tracker to look at this: http://code.google.com/p/google-apps-script-issues/issues/detail?id=674