Danny
Danny

Reputation: 107

How do I create active HTML inside the body of an email?

I am working on this small application that receives XML, converts it into HTML, and sends it to recipients. I want to create HTML in the message body that I will be able to work with, such as a text-area that the recipient will be able to write some text in and send it back to the sender. Is this possible, or can I insert just HTML With links into the mail body? I'm writing the app in C#.

Upvotes: 2

Views: 503

Answers (1)

Ricardo Altamirano
Ricardo Altamirano

Reputation: 15198

Yes, it is feasible to include form fields in an HTML email, but it is not something you should get into the habit of doing. There are several problems with this approach:

  1. If you come to rely on those forms, you run into problems with email clients that either don't support or don't enable HTML emails. It is certainly possible to include a separate text email, but you also run into problems where email clients will impose limits on message length that may run afoul of lengthy stretches of HTML code.
  2. Even if the client does support HTML emails, HTML forms in emails are considered by many to be a security risk, so some email clients that allow HTML emails in general will disable HTML forms altogether.

You're better off including in every type of email you send out, plain text or HTML, a link to an HTML form on your site. This gives you one standardised form to secure, configure, and support, and also prevents you from dealing with email clients that don't support your message. Incidentally, since many email clients don't support Javascript, regardless of their support for HTML, you're somewhat limited in what you can work into HTML forms when you include them in the body of an email.

EDIT: For further reading, consult this link or this answer, both of which make similar points.

Upvotes: 1

Related Questions