电子邮件中的复选框 [英] Checkbox in an email
问题描述
我正在使用c#MailMessage创建电子邮件,并且试图添加不需要单击的复选框.复选框将用于为事件带来什么的清单(例如装箱清单).我有:
I am creating an email using the c# MailMessage and I am trying to add a checkbox that doesn't need to be clicked. The checkboxes will be used for a checklist of what to bring to an event (like a packing list). I have:
MailMessage objEmail = new MailMessage();
objEmail.From = new MailAddress("sender@hotmail.com");
objEmail.To.Add(new MailAddress("example1@hotmail.com"));
objEmail.CC.Add(new MailAddress("example2@hotmail.com"));
objEmail.Bcc.Add(new MailAddress("example3@hotmail.com"));
objEmail.Subject = "Packing list!";
objEmail.IsBodyHtml = true;
objEmail.Body = @"<div width=""800px"">
<h3>WHAT TO BRING</h3>
<form>
<input type=""checkbox"" name=""item"" value=""shirt"">Shirt<br>
<input type=""checkbox"" name=""item"" value=""shoes"">Shoes
</form></div>";
但是当我发送电子邮件时,复选框未出现在列表中.
使用outlook.com在Outlook中输出:
but when I send the email the checkboxes do not appear in the list.
Output in outlook using outlook.com:
我有一辆自行车
我有车
I have a bike
I have a car
使用Microsoft Outlook在Outlook中输出:
Output in outlook using Microsoft Outlook:
[]我有一辆自行车
[]我有车
[ ]I have a bike
[ ]I have a car
使用hotmail.com在Outlook中输出:
Output in outlook using hotmail.com:
我有一辆自行车
[]我有车
I have a bike
[]I have a car
问题出在邮件客户端上,但是问题出在哪里却不一致.我有什么办法可以使输出一致? html是否可以使用一种方法来创建复选框,或者我是否只需要包含复选框的图像? 预先感谢.
So the problem is with the mail client but it is inconsistent what the problem is. I s there any way to make a consistent output? Is there a way with html that works to create the checkboxes or do I just need to include images of a checkbox? Thanks in advance.
推荐答案
我的猜测是,它们与电子邮件客户端处理复选框的方式不一致.
My guess is that their in inconsistency with the way the email clients handle check boxes.
为什么不将它们分别更改为纯文本[X],以便所有电子邮件客户端都能看到它.
Why not change each to [X] which is plain text so all email clients can see it.
这篇关于电子邮件中的复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!