Checkbox in an email

Posted by Austin on Stack Overflow See other posts from Stack Overflow or by Austin
Published on 2013-07-03T16:39:08Z Indexed on 2013/07/03 17:05 UTC
Read the original article Hit count: 323

Filed under:
|
|
|

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("[email protected]");
objEmail.To.Add(new MailAddress("[email protected]"));
objEmail.CC.Add(new MailAddress("[email protected]"));
objEmail.Bcc.Add(new MailAddress("[email protected]"));

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>";

but when I send the email the checkboxes do not appear in the list.

Output in outlook using outlook.com:

WHAT TO BRING

I have a bike
I have a car


Output in outlook using Microsoft Outlook:

WHAT TO BRING

[ ]I have a bike
[ ]I have a car


Output in outlook using hotmail.com:

WHAT TO BRING

I have a bike
[]I have a car

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.

© Stack Overflow or respective owner

Related posts about c#

Related posts about html