Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6912361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:04:56+00:00 2026-05-27T09:04:56+00:00

How do you do the following using cfscript? <cfmail from=me@domain.com to=you@domain.com subject=Attachments> <cfmailparam name=Reply-To

  • 0

How do you do the following using cfscript?

<cfmail
   from="me@domain.com"
   to="you@domain.com"
   subject="Attachments">
   <cfmailparam name="Reply-To" value="me@domain.com">
   Some message goes here...
   <cfmailparam file="c:\files\readme.txt">
   <cfmailparam file="c:\files\logo.gif">
</cfmail>

Using the following causes a “function keyword is missing in FUNCTION declaration” error:

mail subject="Test Email" from="me@domain.com to="you@domain.com" server="localhost" {
    mailpart file="#ExpandPath('readme.txt')#";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:04:56+00:00Added an answer on May 27, 2026 at 9:04 am

    Here’s a how-to explaining what needs to be done: http://simonbingham.posterous.com/sending-email-using-cfscript-in-coldfusion-9

    // Create an instance of the mail object
    mail=new mail();
    
    // Set it's properties
    mail.setSubject( "Sample Email" );
    mail.setTo( "to@example.com" );
    mail.setFrom( "from@example.com" );
    mail.setCC( "cc@example.com" );
    mail.setBCC( "bcc@example.com" );
    
    // Add an attachment
    mail.addParam( file="C:\foo.txt" );
    
    // Add email body content in text and HTML formats
    mail.addPart( type="text", charset="utf-8", wraptext="72", body="This is a test message." );
    mail.addPart( type="html", charset="utf-8", body="<p>This is a test message.</p>" );
    
    // Send the email
    mail.send();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have the following: using(var ctx = DataContextFactory.Create(0)) { ... Some code ...
I wanted to generate the following using XmlSerializer : <atom:link href=http://dallas.example.com/rss.xml rel=self type=application/rss+xml />
How would you do the following using the JPA query language? select * from
I have the following using jQuery: var x = $('.boxes > input:checked'); From x
I am attempting to dynamically create the following using data from an array <li><a
How would one code the following using XGrid from JFXtras6? Stage { title: Mig
I need to implement following using code: <basicHttpBinding> <binding name=NewBinding> <security mode=TransportCredentialOnly> <transport clientCredentialType=Basic
I'm getting the following using the PHP client on my server (connecting via FBML).
Is there a way to do the following using LINQ? foreach (var c in
How do I do the following using built-in modules only? I have a list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.