function auto_reply() { const subject = 'GoogleVoice 保号'; const myPhone = '1234xxx'; // 第一个号 const myEmail = Session.getActiveUser().getEmail(); const targetPhone = '1678xxxx'; // 第二个号,或者是别人的号 // 从第一个号发送到第二个号的邮箱地址 // 需要在 Google Voice 设置中开启转发到邮箱功能 // 接收到一次信息后,就能看到这个地址 const targetEmail = '1234xxx.1678xxx.xxx@txt.voice.google.com'; const htmlBody = `
我的邮箱是: ${myEmail}
我的电话是: ${myPhone}
这是从 ${myPhone} 发送给 ${targetPhone} 的消息
每周发送,保活一次
`; // 纯文本内容 const textBody = `Google Voice 保活,我的邮箱是: ${myEmail},我的电话是: ${myPhone}。这是从 ${myPhone} 发送给 ${targetPhone} 的消息,每周发送,保活一次。`; MailApp.sendEmail({ to: targetEmail, subject: subject, htmlBody: htmlBody, body: textBody, }); }