Send E-Mail from Your Web Applications

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Page Design

By using the code attached to this article, with just a bit of configuration, you can send e-mails from your Web pages.

The e-mail application page that you create should be designed to contain the necessary e-mail fields:

  1. A “label from” control with text property initialized to your e-mail address or any other address to be used to indicate where the e-mail came from.
  2. A note of caution: You can write any e-mail ID in this control. The e-mail will apeear to be sent from that ID, so you send mail to anyone from anyone else’s e-mail ID. This is discouraged, and this is why it is best to not make your ‘from’ field an open entry field. Otherwise, people may use your form to send spam.

  3. Three textboxes one each for “textTo”, “textSubject”, and “textComments” controls.
  4. Two buttons, one for Sending mail and other for clearing the textboxes.

For my form, the page design looks like the page below:

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read