使用bash在HTML Outlook电子邮件中嵌入可单击链接

使用bash在HTML Outlook电子邮件中嵌入可单击链接,html,bash,Html,Bash,我正在编写一个bash脚本,如果用户的AWS密钥过期,它会向用户发送一封电子邮件。我想包括一个点击链接到一个服务现在票,他们可以使用他们的AWS的钥匙旋转 这是脚本中设置电子邮件文本的部分: fusion_link='<a href="https://company.service-now.com/myfusion?id=sc_cat_item&sys_id=7949c77e6ffc310048c83cb44b3ee4a7">Change AWS Configuration&

我正在编写一个bash脚本,如果用户的AWS密钥过期,它会向用户发送一封电子邮件。我想包括一个点击链接到一个服务现在票,他们可以使用他们的AWS的钥匙旋转

这是脚本中设置电子邮件文本的部分:

fusion_link='<a href="https://company.service-now.com/myfusion?id=sc_cat_item&sys_id=7949c77e6ffc310048c83cb44b3ee4a7">Change AWS Configuration</a>'
   template1="Hello $first_name, \n\nYour access key: $user_access_key1 for user name: $user_name was created on $date1 and needs to be replaced.\n\nThis key is in AWS Account: $aws_key ($accountnumber).\n\nPlease open up a fusion ticket using this catalog item: $fusion_link to have Cloud Ops rotate your keys.\n\nAll AWS Keys need to be replaced if they are older than 90 days.\n\nRegards,\nCloud Ops"

锚定标签在电子邮件中,但不可单击。如何正确设置链接的格式,以便用户可以单击它

所以锚定标签在那里,但它是不可点击的,这就是你说的吗?你必须告诉Outlook你的电子邮件内容是HTML。这是通过
Content-Type
邮件头完成的,其他邮件也是如此。你没有告诉我们你是如何发送邮件的,所以我们看不到你的邮件头。谢谢大家。为了清晰起见,我更新了OP。请看一下这个问题,并向下滚动到带有许多向上投票的答案:好的,谢谢!我会的!
Hello Tim, 

Your access key: AKIAI7EYXZMWBBAOLYJA for user name: tdunphy was created on Thu Jan  4 16:03:32 EST 2018 and needs to be replaced.

This key is in AWS Account: company-ab-nonprod (151528745488).

Please open up a fusion ticket using this catalog item: <a href="https://company.service-now.com/myfusion?id=sc_cat_item&sys_id=7949c77e6ffc310048c83cb44b3ee4a7">Change AWS Configuration</a> to have Cloud Ops rotate your keys.

All AWS Keys need to be replaced if they are older than 90 days.

Regards,
Cloud Ops
echo -e  "$template1" | /usr/bin/mail -s "AWS Key Rotation Needed for $user_name in $aws_key" "$email_address"