outlook HTML签名制作方法

2021-6-22    前端达人

   最近公司要求统一邮件签名格式,好一顿折腾啊!因为统一提供的签名是HTML格式 而outlook不直接提供HTML的签名生成和修改。但其实outlook的签名是有HTML格式的,并且可以直接编辑,方便而且更好控制,只是outlook对HTML的支持限制很多,很多元素无法使用。以前基本上不会写HTML,为了这个签名,HTML倒是学会了不少,也算意外收获吧。痛并快乐着!

      首先,要制作outlook签名,需要在outlook先生成一个签名,起个名字就行,反正内容是要重新修改的。打开outlook,依次打开工具-》选项-》邮件格式,就能看到签名按钮。点击签名按钮,打开签名和信纸对话框,选电子邮件签名选项卡,然后点击新建,输入个名字,OK。第一步到此结束。


      然后打开“C:\Users\你的用户名称\AppData\Roaming\Microsoft\Signatures”目录就可以看到三个文件,一个文件夹,其中那个htm文件就是我们签名的htm版本。用记事本打开这个文件后可以看到很多的html代码,这些都是outlook自动生成的,对我们没有用处,全选然后删除吧。.rtf和.txt两个文件是签名的富文本和纯文本格式,可以直接删除那两个文件。和.htm同名的文件夹千万不要删除,那个html文件需要那个文件夹,它们是一体的,这个文件夹里会缓存一些图片,看需求吧,不需要就可以直接删除,特别对于签名图片是网络引用的那种,一定要删了,要不然outlook只是用那些缓存图片,即使网络图片更换,它也不会变化。

      最后可以将以下代码复制进那个htm文件

<head> 
</head> 
<body> 
<hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="1"> 
<tbody> 
<tr> 
<td valign="top" width="55" height="60"> 
<img src="http://www.xxxxxx.cn/email/logo.gif" width="45" height="45"> 
</td> 
<td valign="top" height="60" style="mso-line-height-rule:exactly; line-height:2.5;font-size:12px;"> 
<strong><span><font face="宋体">你的名字</font> ┃ <font face="宋体">营销中心</font><br></span></strong> 
<strong><span style="color:#C42634;"><font face="宋体">xxxxxxxxxx有限公司</font></span></strong> 
</td> 
</tr> 
</tbody> 
</table> 
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="1"> 
<tbody> 
<tr> 
<td valign="top" style="mso-line-height-rule:exactly; line-height:2.5;font-size:12px;>  
 <span><font face="宋体">移动电话</font> <font face="Tahoma">Mobile:139-8765-4321</font> <font face="宋体">办公座机</font> <font face="Tahoma">Office Tel:029-1234 5678 Ext.604</font> <font face="宋体">公司网站</font> <font face="Tahoma">Web:http://www.xxxx.com</font></span><br> 
<span><font face="宋体">电子邮箱</font> <font face="Tahoma">E-mail:xxxxxx@xxxxx.com</font> <font face="宋体">公司地址</font> <font face="Tahoma">Address:</font><font face="宋体">xxxxxxxxxxx</font><font face="Tahoma">x</font><font face="宋体">层</font><font face="Tahoma">xxxx</font></span><br> 
</td> 
</tr> 
<tr> 
<td valign="top" style="mso-line-height-rule:exactly; line-height:1.5;font-size:10px;color:#CCCCCC;"> 
<span><font face="宋体">保密提示:本邮件及其附件含有保密信息,受商业秘密相关法律法规保护,不得泄露,仅限于发送给上面地址中列出的个人或群组合法使用。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散布)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!谢谢您的合作。</font><font face="Tahoma"> Confidentiality Notice: This e-mail and its attachments contain confidential information, which is protected under commercial secrets related laws and regulations, and intended only for the legitimate use of person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it.</font><br></span> 
</td> 
</tr> 
</tbody> 
</table> 
<img src="http://www.xxxxxx.cn/email/ad.gif"><br> 
</body> 
</html> 

      在outlook签名中最难处理的行高,line-height属性,outlook的这个属性只能支持在块上设置,比如可以给td标签设置line-height,但是不能给span设置line-height,否则行高设置是不起作用的。

     具体内容可以根据实际情况改写。修改签名文件后,最好关闭outlook重新打开一下,要不然outlook里面会有缓存,造成显示错误。



蓝蓝设计建立了UI设计分享群,每天会分享国内外的一些优秀设计,如果有兴趣的话,可以进入一起成长学习,请扫码蓝小助,报下信息,蓝小助会请您入群。欢迎您加入噢~~希望得到建议咨询、商务合作,也请与我们联系。

截屏2021-05-13 上午11.41.03.png


转自:csdn 作者:ssmile

分享此文一切功德,皆悉回向给文章原作者及众读者.

免责声明:蓝蓝设计尊重原作者,文章的版权归原作者。如涉及版权问题,请及时与我们取得联系,我们立即更正或删除。

蓝蓝设计www.lanlanwork.com )是一家专注而深入的界面设计公司,为期望卓越的国内外企业提供卓越的UI界面设计、BS界面设计 、 cs界面设计 、 ipad界面设计 、 包装设计 、 图标定制 、 用户体验 、交互设计、 网站建设 平面设计服务


分享本文至:

日历

链接

blogger

蓝蓝 http://www.lanlanwork.com

存档