Coldfusion form validation: Changing the "Subject" of an email based on server date/time

Hi,
I've provided a basic coldfusion email template for you to
edit if necessary.
In my validation I'd like to check the date / time on the
server.
If the date entered into the form is within 24 hours of the
server date / time then insert "Urgent" into the subject of the
email.
Along with that I'd like to add a "read reciept to my email"
if thats possible.
Any ideas?
<!--- Form variables here --->
<cfparam name="FORM.FirstName" default="">
<cfparam name="FORM.LastName" default="">
<cfparam name="FORM.Email" default="">
<cfparam name="FORM.Phone" default="">
<cfparam name="FORM.Comments" default="">
<cfparam name="FORM.Action" default="">
<cfparam name="URL.Msg" default="">
<cfset VARIABLES.Msg="#URL.Msg#">
<cfif VARIABLES.Msg is "" and FORM.Action is "Submit">
<!--- Validation --->
<cfif Trim(FORM.FirstName) is "">
<cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
must enter your first name</li>">
</cfif>
<cfif Trim(FORM.LastName) is "">
<cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
must enter your last name</li>">
</cfif>
<cfif Trim(FORM.Email) is "">
<cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
must enter your Email Address</li>">
</cfif>
<cfif Trim(FORM.Phone) is "">
<cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
must enter your Phone Number</li>">
</cfif>
<cfif Trim(FORM.Comments) is "">
<cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
must describe your query</li>">
</cfif>
<!--- Process data mailto: --->
<cfmail to="[email protected]"
cc="#FORM.Email#"
from="SENDER"
subject="SUBJECT" type="html">
Dear #FirstName# The Following details have been processed:
#Form.FirstName# #Form.LastName# #Form.Phone# #Form.Email#
#Form.Comments#
</cfmail>
<cfif VARIABLES.Msg is "">
<!--- Process finished either cf location or URLmessage
--->
<cflocation
url="baseform.cfm?Msg=#URLEncodedFormat('Information validated
& posted - Thank you!')#" addtoken="No">
</cfif>
</cfif>
<!--- ERROR MESSAGE appears here above form --->
<cfoutput>
<cfif VARIABLES.Msg is not "">
<ul>
#VARIABLES.Msg#
</ul>
</cfif>
<form action="baseform.cfm" method="POST"
enctype="multipart/form-data">
<table cellspacing="2" cellpadding="2" border="0"
class="form_table">
<tr>
<th>* First Name:</th>
<td><input type="text" class="inputbox"
name="FirstName" message="" validateat="onServer"
value="#FORM.FirstName#" size="30"></td>
</tr>
<tr>
<th>* Last Name:</th>
<td><input type="text" class="inputbox"
name="LastName" message="" validateat="onServer"
value="#FORM.LastName#" size="30"></td>
</tr>
<tr>
<th>* Phone:</th>
<td><input type="text" class="inputbox"
name="Phone" message="" validateat="onServer" value="#FORM.Phone#"
size="20"></td>
</tr>
<tr>
<th>* Email:</th>
<td><input type="text" class="inputbox"
name="Email" message="" validateat="onServer" value="#FORM.Email#"
size="30"></td>
</tr>
<tr>
<th>Required Date:</th>
<td><input type="text" id="SdDays" name="SdDays"
value="" size="4" maxlength="2" class="inputbox">
<input type="text" id="SdMonths" name="SdMonths" value=""
size="4" maxlength="2" class="inputbox">
<input type="text" id="SdYears" name="SdYears" value=""
size="6" maxlength="4" class="inputbox">
</td>
</tr>
<tr>
<th>* Query:</th>
<td><textarea name="Comments" class="inputbox"
cols="40" rows="6" validateat="OnServer" message=""
tooltip="tooltip in here" enabled="yes"
value="#FORM.Comments#"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Action" id="Submit"
value="Submit">
<input type="reset" value="Reset" id="Reset">
</td>
</tr>
</table>
</form>
</cfoutput>

Any progress?

Similar Messages

  • Change of subject stated in email received and saved to folders

    Is there a way to change the subject line of email received? I save a lot of emails and when I put them into folders, sometimes the subject listed is not descriptive of the actual content that I am saving. I would like to change the subjet at that time to something more meaningfull to me.

    The only way I know to do that in Mail is by resending the message to yourself — use Redirect instead of Forward to better preserve the integrity of the original message.

  • How do I change the subject of an inbox and outbox in order to organize them better

    I would like to change the Subject of received and sent mails in Thunderbird. I used to be able to do this with Eudora and it helped me to organize them better especially when the subject and content didn't match!

    They are designed for Thunderbird not Firefox.
    Current version of Thunderbird is 31.5.0 and they work with that version.
    Are you using a Thunderbird beta version?

  • Insert data from a field into the subject of an email generated form a form

    Hi,
    Is there a way to have the contents of a field come up in the subject of an email that is made when a submit by email button is clicked.
    The data we want is from a date field for a 'week commencing'.
    We have a text string that is entered on the button's properties - email subject, but we'd like to add the contents of a field on the form onto this.
    any ideas?
    thanks,
    declan.

    Try this code in the click-event of the mail-button (you will have to adjust it of course):
    var anrede;
    if (xfa.form.Formular.Beratungsprotokoll.Kunde.Anrede.rawValue == "Herr") {
    anrede = "Sehr geehrter Herr "; }
    else {
    anrede = "Sehr geehrter Frau "; }
    var mailText = anrede + xfa.form.Formular.Beratungsprotokoll.Kunde.Name.rawValue +
    "\nPlease print this form and mail it to me!" +
    "\n\nTo speed up processing you can also click on the button 'ok'. " +
    "This will generate an e-mail. Please send this e-mail to me." +
    "\n\nThank you" +
    "\nYour agent";
    event.target.submitForm({cURL:"mailto:" +
    Formular.Beratungsprotokoll.Kunde.EMail.rawValue +
    "?subject=consulting minutes&body=" + mailText,
    cSubmitAs:"PDF",cCharset:"utf-8"});

  • How do I change the subject line on incoming email

    On my old PC I could easily start typing in the subject line of a received email.  This would allow me to search for a name later on when looking for an invoice.  I dont know how to change the subject line of an incoming email to my imac?

    This site tells you how to edit the subject of a message.  I just tested using OS X 10.8.5 and it worked, without altering the time & date stamp, or the original sender info. 
    http://email.about.com/od/macosxmailtips/qt/et_edit_receive.htm
    Steps copied below:
    Drag and drop the desired message out of Mac OS X Mail onto the Desktop.
    Ctrl-click on the message copy on the Desktop.
    Select Open With | TextEdit from the menu.
    Make the desired changes to the message source.To change a message's subject, look for "Subject:" at the beginning of a line starting from the top.  (hint, you can use 'Command-F' to bring up a search window to help you find the "Subject").
    Close TextEdit saving the document.
    Ctrl-click on the message on the Desktop again.
    Select Open With | Mail from the menu this time.
    Now select Message | Copy To followed by the message's original folder from the menu in Mac OS X Mail.
    Close the message window.
    Delete the message copy from your Desktop.
    Optionally, delete the original message in Mac OS X Mail.  (when I tested this, the original message was no longer there.  Not sure what happened to it, but the changes worked without editing the time, date, or original sender information.)

  • VS2013 Update 1 install failing: The form specified for the subject is not one supported or known by the specified trust provider.

    Hi
    I just tried to install VS2013 update 1 ("Run As Administrator") from the ISO image and the installation finishes with a lot of messages like these:
    "JavaScript Tooling: The form specified for the subject is not one supported or known by the specified trust provider."
    "Microsoft Visual Studio 2013 IntelliTrace core x86: The form specified for the subject is not one supported or known by the specified trust provider"
    I have 19 of these messages.
    I had a quick look at the log file and I see this block of messages repeated quite a lot (for different files, not just "PerfTools_CORE_x86.msi"):
    [8C10:9AC4][2014-01-23T07:46:04]i338: Acquiring package: PerfTools_CORE_x86.msi, payload: PerfTools_CORE_x86.msi, copy from: C:\Users\<removed>\Downloads\Microsoft\VS2013.1\packages\PerfTools_CORE\x86\PerfTools_CORE_x86.msi
    [95A4:996C][2014-01-23T07:46:04]e000: Error 0x800b0003: Failed authenticode verification of payload: C:\ProgramData\Package Cache\.unverified\PerfTools_CORE_x86.msi
    [95A4:996C][2014-01-23T07:46:04]e000: Error 0x800b0003: Failed to verify signature of payload: PerfTools_CORE_x86.msi
    [95A4:996C][2014-01-23T07:46:04]e310: Failed to verify payload: PerfTools_CORE_x86.msi at path: C:\ProgramData\Package Cache\.unverified\PerfTools_CORE_x86.msi, error: 0x800b0003. Deleting file.
    [95A4:996C][2014-01-23T07:46:04]e000: Error 0x800b0003: Failed to cache payload: PerfTools_CORE_x86.msi
    [8C10:9AC4][2014-01-23T07:46:04]i000: MUX:  Verify Failed.  Retry acquiring, Retry Count: 1 of 3
    [8C10:9AC4][2014-01-23T07:46:04]i000: MUX:  Set Result: Return Code=-2146762749 (0x800B0003), Error Message=, Result Detail=, Vital=False, Package Action=Verify, Package Id=PerfTools_CORE_x86.msi
    [8C10:9AC4][2014-01-23T07:46:04]e314: Failed to cache payload: PerfTools_CORE_x86.msi from working path: C:\Users\<removed>\AppData\Local\Temp\{2f6f0fc4-5f66-4635-a4d2-1dd8d9481c63}\PerfTools_CORE_x86.msi, error: 0x800b0003.
    [8C10:9AC4][2014-01-23T07:46:04]e349: Application requested retry of payload: PerfTools_CORE_x86.msi, encountered error: 0x800b0003. Retrying...
    [8C10:9AC4][2014-01-23T07:46:04]i338: Acquiring package: PerfTools_CORE_x86.msi, payload: PerfTools_CORE_x86.msi, copy from: C:\Users\<removed>\Downloads\Microsoft\VS2013.1\packages\PerfTools_CORE\x86\PerfTools_CORE_x86.msi
    [8C10:9AC4][2014-01-23T07:46:04]i000: MUX:  Reset Result
    [95A4:996C][2014-01-23T07:46:04]e000: Error 0x800b0003: Failed authenticode verification of payload: C:\ProgramData\Package Cache\.unverified\PerfTools_CORE_x86.msi
    [95A4:996C][2014-01-23T07:46:04]e000: Error 0x800b0003: Failed to verify signature of payload: PerfTools_CORE_x86.msi
    [95A4:996C][2014-01-23T07:46:04]e310: Failed to verify payload: PerfTools_CORE_x86.msi at path: C:\ProgramData\Package Cache\.unverified\PerfTools_CORE_x86.msi, error: 0x800b0003. Deleting file.
    [95A4:996C][2014-01-23T07:46:04]e000: Error 0x800b0003: Failed to cache payload: PerfTools_CORE_x86.msi
    [8C10:9AC4][2014-01-23T07:46:04]i000: MUX:  Verify Failed.  Retry acquiring, Retry Count: 2 of 3
    My Visual Studio still seems to load following the failed installation, but I'm not sure if anything is broken yet.
    Does anyone have any idea what the problem is?
    Thanks, Greg

    Hi Greg,
    Most of the same error as far as I see are due to corrupt installer. Please try use fciv.ext tool from this site:
    http://support.microsoft.com/kb/841290/en-us
    Then use sha-1 number to compare it with the one listed here:
    http://www.microsoft.com/en-us/download/details.aspx?id=41650
    SHA-1: 51403CAF8E5E9799ACF1F3A0DA0E46390CD2FB16
    If it is not the same, you have to redownload your ISO, it is corrupt.
    Regards,
    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Change the subject on a received e mail

    is it possible to change the subject of a received e mail in order to file it ?

    AFAIK, not with Apple's Mail app. That's doable with Eudora.

  • EREC: Change the subject of rejection e-mail

    Hi everyone,
    I'd like to change the rejection e-mail's Subject, but I can't find the customizing, or the relevant part of the code, where the subject is created.
    I checked the workflow log (transaction swell) and I think I found the part when the email is created there are two task:
    There is to Activity "Create activity" and "Send document"
    The first one is using the
    ERC_ACTIV - CREATEACTFROMDATA method to create the activity
    ERC_ACTIV - PROCESSDOCUMENT  is to send the document
    It is using the cl_hrrcf_act_abstract_corr_rec:
    * Document will be sent by the channel EMAIL.  
           CALL METHOD LO_ACT_CORR->PROCESS_DOCUMENT
             EXPORTING                              
               CHANNEL  = 'E_MAIL'                  
             IMPORTING                              
    *    DOCUMENT =                                
                RETURN   = LT_RETURN                
    The problem is that I debugged several times, but can't find the place, where the subject of the e-mail is created.
    Do you have any idea, where can I change the subject of the rejection e-mail?
    Thanks & Bye
    N.

    Hello,
    The standard system uses the description of the smartform as the subject of the e-mail so you could copy the smartform and change the description to suit your requirement. If you wish to put your own logic for getting the subject at runtime I think it is done in class CL_HRRCF_CS_DOC_CAT_SF_SUPER. In there is method set_subject I think. You will then maybe copy this and make your own class with the required methods and use them while sending a smartform. Hope this helps.
    Regards

  • I set up an autoreply but i cannot work out how to change the subject line to the one I want

    I set up an automatic reply but the subject line come up as re: and what the other person wrote. I want to change the subject line to a set one to all emails. How can I do that?

    What email program are we referring to?

  • Can we change the subject area of an existing report

    Hi,
    Is it possible to change the subject area of an existing anlaysis?
    Thanks,
    KK

    @842704 - Yes, you can change. Go to the Advanced Tab of the report, in the Request XML find and replace the name of your old SA name with the new name. Once done hit the Set XML button to apply your changes and save your report. We had done this for few reports and observed that mainly there are two instances found in the XML where the name of SA appears.
    <saw:criteria subjectArea="SAName">
    <saw:filter subjectArea="SAName">
    @Deepak - Had a query regarding changing the name of Subject Area with the option you provided. When we had tried to use that option (which is simpler than what I mentioned above), we observed that it used to work fine. However, in the request XML we found that for saw:criteria tag the value was updated but not for saw:filter (it still used to hold the name of old SA). Although the report worked fine. Any thoughts regarding this behaviour?
    Thanks

  • How can I retrieve emails that were deleted off my iPhone 4s when I changed the password to my email acccount?

    I changed the password to my email account and when I changed it in my phone all of my emails were deleted Is there any way to retrieve them? They are in the server and I can access them via Outlook just not on my iPhone or iPad.

    They won't be in icloud, since the only thing that would contain pictures are backups.  But they were deleted before you signed up for icloud, so forget that.  The only other thing to check is you computer.  Users are always advised to sync photos to computers for archiving.  If you did that, you should be able to find them there.  But without any backups or copies of them, then they are history.
    And no, you can't look at pictures in icloud.

  • Is there a way to change the font color for emailing and the signature?

    Is there a way to change the font color with email signature on the iPhone and iPad?
    I changed the color in Word on my laptop, emailed and copied to my signature, but it converts it back to black........

    Looks like you didn't get a reply on your post, but it is still a problem.  Font size is supposedly changeable via "Accessibility" in Settings, but it doesn't work.  You can turn on "Zoom".

  • I have the new 2011 macbook pro, with lion preinstalled. I want to change the harddrive. I have backed up everything on time machine. when i put my new blank hard drive in will the lion screen startup.How do i get the lion dmg when i am already using lion

    I have the new 2011 macbook pro, with lion preinstalled. I want to change the harddrive. I have backed up everything on time machine. when i put my new blank hard drive in will the lion screen startup.How do i get the lion dmg when i am already using lion

    NicholasLiban -
       When you use the Lion restore as described, it does a fresh install on the hard drive that you can select at the beginning of the process.  This provides a complete install of the very latest version of Lion, including the recovery partition.  The drive that you choose for the installation destination winds up like what you would have on a brand new computer from Apple. 
       - Randy

  • How to change the sender's name/email-id in the scheduled report

    Hi,
    We have SCOM 2007 R2. In the Reporting tab (SCOM Console), we have some scheduled reports. I need to change the sender's name/email-id in a scheduled report. When we receive the report through email, receiving with the person's name who moved out of the
    team.
    I tried to change but could not find the option to change while editing the properties in SCOM Console under Reporting -> Scheduled Reports.
    When we are receiving mail from that scheduled report, instead of an individual name, would like to provide a generic name. Please help me out. Let me know, if you need more information.
    Thanks,
    Naren.
    Thanks & regards, Naren.

    Hello,
    the SCOM scheduled reports feature rely on SQL Reporting Services. So, if you would like to change the SMTP configuration, you should go in SQL Reporting Services Configuration Manager:
    Open in the Start Menu, Reporting Services Configuration Manager.
    In the connection window, click OK.
    Click on the tab E-mail settings.
    Change the Sender Address.
    Click Apply.
    Alternatively, you could also change in the Scheduled report properties the field
    Reply to. I think it should customize the reply address for each scheduled reports, but I have never used it. Anyway, doing it with Reporting Services Configuration Manager is more interesting in the long-run.

  • How to increase the length of the subject line in email using FM

    Hi
    we have maintained 50 characters for the subject line initially, but some subjects are having more than 50 characters. how can we increase the length of the subject line in email.
    urgent.
    points will be rewarded generousely.

    Hi Rana,
    In this case, you have to create a user defined field of required length under Journal Transactions Header to fill the data.
    Regards,
    Vijay Kumar
    SAP Business One Forums Team

Maybe you are looking for