I can't get the following code:
GMailApp.sendEmail('m...@mydomain.nl','Subject of this email',Logger.getLog(), {name:'Save attachments from triggered attachment script',from:'log...@mydomain.nl'}
to actually put the from email address in send emails from my Google Workspace account. All emails from the script have
m...@mydomain.nl (which is the default address for my domain) as the from email address.
I can send with the
log...@mydomain.nl from the Gmailapp without a problem. It is just that within GAS it doesn't work. I also tried different aliases. Same results.
log...@mydomain.nl is is one of my aliases and it is in the returned list of GmailApp.getAliases(). I tried with both 'treat as an alias' checked and unchecked.
Do you have an idea as to what the problem might be? Thanks in advance.
Regards,
Peter Berkhout