2013-08-28 3 views
0

Google 스크립트에 하이퍼 링크를 삽입하려고하지만 하이퍼 링크없이 텍스트를 반환합니다. 아래의 확인 : 당신은 당신이 포함 HTML이 외부에서 떨어져 메시지의 실제 있지 않은지 확인해야Google Script에서 하이퍼 링크가 작동하지 않습니다.

if (emailSent != Email_Sent) { 
     if (visitType == "Taking") { 
     var subject = "Equipment Checked out from Storage"; 
     MailApp.sendEmail(emailAddress, 
          subject, 
          "Hello" + 
          "\n\nThis is a reminder for myself " + emailAddress + 
          "\n\nI am " + visitType + " " + amount + " x " + equipment + 
          "\n\nRemember to return it within 15 days unless i want to keep the equipment" + 
          "\n\nThanks" + 
          "\n\n For the sake of improving our service, please complete the feedback form " + **<a href="https://docs.google.com/a/1234/sharing/.."> here </a>);** 

답변

1
var url = "https://docs.google.com/a/1234/sharing/.."; 

"\n\n For the sake of improving our service, please complete the feedback form <a  href="+url+">here </a>"); 

.

또한 전체 메시지를 메시지 변수에 넣으므로 MailApp가 다소 깨끗합니다. html 작업을하려면 특수 첨부 파일을 추가해야합니다. 예는 다음과 같습니다.

MailApp.sendEmail(email,subject,message,{htmlBody:message}); 
관련 문제