Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    oulu, Finland
    Thanked 0 Times in 0 Posts

    CDONTS MAIL (ASP/vb script)


    Can i ask here about CDONTS? Sending mail using CDONTS.
    I have created a form(table) with the following columns for a meeting announcement to a person. Subject, date, place, time, attendees,description and contact person. Now i would like to add a column like priority= (high,normal and low). How should i say that add the value selected in the priority name field to the body of the message. Could someone help me with a example of drop-down list box.

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Indianapolis, Indiana, USA
    Thanked 0 Times in 0 Posts

    Re: CDONTS MAIL (ASP/vb script)

    This is probably more appropriate for the Web Design forum, but we'll address it here until a Mod decides to move it...

    I'm not quite clear about your Priority option - do you want the email to be marked with High priority, or do you just want some indication in the body of the message that says "High Priority"?

    You can set the Importance property of the message in the CDO objects with the following lines (assuming your mail object is named "objMail"):

    'High Priority
    objMail.Importance = CdoHigh

    'Low Priority
    objMail.Importance = CdoLow

    If you want to add it to the Body of the message, simply concatenate it into the String that will become the Body of your message - like this:

    If Request.Form("Priority") = "High" Then
    strBody = strBody & " High Priority"
    Elseif Request.Form("Priority") = "Low" Then
    strBody = strBody & " Low Priority"
    End If
    objMail.Body = strBody

    You would, of course, have to place it in the correct location within the Message body.

    You'll need a Drop-down box within the form on your Form's page that looks like this (I called it "Priority" - you can use whatever you like):

    <select size="1" name="Priority">
    <option value=""></option>
    <option value="Low">Low Priority</option>
    <option value="High">High Priority</option>

    Hope this helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts