• home
  • forum
  • my
  • kt
  • download
  • Coldfusion Mail Script

    Author: 2008-08-05 06:55:20 From:

    In this short tutorial i will show you how to easily add mail functionality to your website using the cfmail tag. This script could be used to send newly registered users a confirmation email or could actually be developed into a full webmail system.

    The first thing we need to do is create the basic tag.

    <cfmail to="sample@sample.com" from="test@test.com"

    subject="Welcome to my website!" type="html">


    Body of message

    </cfmail>

    There we have the most basic script to send an email.

    For those of you requiring extra functionality out of your site here is the syntax of the cfmail tag.

    <cfmail
    from = "e-mail address"
    to = "comma-delimited list"
    bcc = "comma-delimited list"
    cc = "comma-delimited list"
    charset = "character encoding"
    debug = "yes|no"
    failto = "e-mail address"
    group = "query column"
    groupcasesensitive = "yes|no"
    mailerid = "header id"
    maxrows = "integer"
    mimeattach = "path"
    password = "string"
    port = "integer"
    priority = "integer or string priority level"
    query = "query name"
    replyto = "e-mail address"
    server = "SMTP server address"
    spoolenable = "yes|no"
    startrow = "query row number"
    subject = "string"
    timeout = "number of seconds"
    type = "mime type"
    username = "SMTP user ID"
    useSSL = "yes|no"
    useTLS = "yes|no"
    wraptext = "column number">


    (Optional) Mail message body and/or cfhttpparam tags

    </cfmail>

    discuss this topic to forum

    relation tutorial

    No relevant information

    New

    Hot