Did you ever wanted to have a single gmail account together with someone else (for example, to get all the bills on) but still want to receive all emails on both private email addresses? Google has a nifty page named "Apps Script". Essentially its an api to the services you're using and you can simply configure a script from their page (javascript). Have a look at it here (requires a google account).
Run a forwarding script for your new mails 🔗
All you have to do is create a new script on the App Scripts page.
Add this function:
function forwardMails() {
const mails = GmailApp.search('is:unread');
if(!mails){
return;
}
for (let i = 0; i < mails.length; i++) {
const messagesInMail = mails[i].getMessages();
for(let j = 0; j < messagesInMail.length; j++) {
const message = messagesInMail[j];
message.forward('example@outlook.com, example@hotmail.com');
message.markRead();
}
}
}
On the left navigation bar, you'll come across a link labeled "triggers." Here, you can specify when the script should run. For instance, I have it set to run every 30 minutes. Adjust the emails you want to forward to. That's it! Now, emails being sent to the chosen gmail will be forwarded to example@outlook.com and example@hotmail.com.
Aside from this, it's an interesting page to explore because a lot of api's are available.
Have fun!