2014-02-27 2 views
0

양식을 제출 한 사람에게 전자 메일을 보내는 스크립트가 있습니다. 그러나 "익명"계정에서 전자 메일을 보내고 확인 이메일이 내 계정에서 오지 않도록하고 싶습니다. 다른 계정에서 이메일을 보내는 방법이 없으므로 이러한 이메일을 모두 수동으로 생성하는 것처럼 보이지 않습니다. 감사!MailApp는 익명 계정으로 Gmail 계정을 보냅니다.

'사용자'가 제출 한 사람과 '이메일'의 구글 계정입니다
if (user = email) { 
    GmailApp.sendEmail(user, subject, message); 
    } 

소원을 제출하는 사람에게 보내 확인을 위해 이메일 주소 :

내 스크립트는 다음과 같은 것입니다.

다시 한 번 방법을 만들 수 있습니까? GmailApp.sendEmail(from:'Anonymous') ???

답변

0

글쎄, 익명으로 말할 수는 없다. "더미"계정으로 앱을 제작하여 이메일 주소를 가려 낼 수는 있지만 실제로 작동하지 않는 비즈니스 또는 교육용 계정을 사용하는 경우에 사용할 수 있습니다. 또한 이메일에 "별칭"이름을 지정하여받는 사람의주의를 분산시키기 위해 약간의 연기를 낼 수 있습니다.

MailApp.sendEmail(userEmail, 
    "Help Desk Ticket", 
    "Thanks for submitting your issue. \n\nWe'll start " + 
    "working on it as soon as possible. \n\nHelp Desk", 
    {name:"Help Desk"}); 
}​ 

그것의 가장 중요한 부분은 마지막 줄 {이름의 요소이다. "헬프 데스크}이 이메일한다" "헬프 데스크 이름을하지만, 마우스 당신이 경우 당신은 여전히 ​​보내는 이메일 주소를 볼 수 있습니다 . (필자는 처음에 "더미"이메일 주소를 권장하는 이유입니다) 위에

이 튜토리얼에서 스크립트의 내용을 볼 수 있습니다 여기에

https://developers.google.com/apps-script/articles/helpdesk_tutorial 내가 같은를 사용하는 방법의 예입니다 대본에있는 것 :

function mailCheatSheet(copyId,userEmail,mrNumber){ 
     var copyId = copyId; 
     var userEmail = userEmail; 
     var mrNum = mrNumber; 
     // Convert temporary document to PDF by using the getAs blob conversion 
     var pdf = DocsList.getFileById(copyId).getAs("application/pdf"); 
     // Attach PDF and send the email 
     var subject = "SA Funding request by: "+userEmail; 
     var body = userEmail +" has submitted a SA Funding Inquiry for " +mrNumber +", which is attached to this email. \n" 
      +"Please ensure there are no errors before printing. \n" 
      +"If there are errors, please notify: [email protected] \n\n"; 
     MailApp.sendEmail(userEmail, subject, body, {name: 'SA Worksheet Helperbot', htmlBody: body, attachments: pdf}); 
     // Delete temp file 
     DocsList.getFileById(copyId).setTrashed(true); 
    } 

하루 종일 주위에 앉아서 이메일 응답을 입력하는 것처럼 보이지 않게하려는 경우 (내 상사가 당신이 뭔가 유용한 일을한다고 생각하기 때문에) 별칭 이름을 추가 할 수 있습니다 당신이 응답을받지 않으려는 이유만으로 익명 계정에서 보내려면

var body = userEmail +" has submitted a SA Funding Inquiry for " +mrNumber +", which is attached to this email. \n" 
     +"Please ensure there are no errors before printing." 
     +"\n\nThis email was automatically authored by Form Helperbot. If there is an error, please report it to: [email protected]"  
    MailApp.sendEmail(userEmail, subject, body,{name: 'Form Helperbot',htmlBody: body, attachments: pdf}); 
0

것은, 그것은 수 있습니다 : 그리고 당신의 GmailApp 방법에는이 같은 전자 메일 본문 하단에 면책 조항 라인을 추가 전자 메일 알림에 더미 회신 주소를 지정하는 것이 좋습니다.

MailApp.sendEmail(userEmail, subject, body, {name: 'SA Worksheet Helperbot', htmlBody: body, attachments: pdf, replyTo: [email protected]}); 
관련 문제