How to Encrypt Email in ColdFusion

Sending messages and information over the Web always involves some degree of risk. Hackers commonly attempt to intercept and steal data during transmission. This is particularly true with messages that may contain personal data sent from websites. If you are using ColdFusion, you can use the native "encrypt" function to scramble the message and then dispatch it to its intended destination.

Instructions

    • 1

      Create a string variable to contain the message:

      <html>
      <body>

      <cfset message = "This is the message to encrypt">

      </body>
      </html>

    • 2

      Encrypt the string using ColdFusion's "encrypt" function:

      <html>
      <body>

      <cfset message = "This is the message to encrypt">
      <cfset encrypted = encrypt(message, '54321')>

      </body>
      </html>

    • 3

      Send the encrypted message using the "cfmail" tag:

      <html>
      <body>

      <cfset message = "This is the message to encrypt">
      <cfset encrypted = encrypt(message, '54321')>

      <cfmail
      to = "bob@mail.com"
      from = "jerry@mail.com"
      subject = "Encrypted Message"
      server = "smtp.mail.com">
      #encrypted#
      </cfmail>

      </body>
      </html>

Related Searches:

References

Comments

Related Ads

Featured