Sending a CDO.Message with high importance?

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default Sending a CDO.Message with high importance?

    Okay... Thought I'd try to move away from CDONTS to CDOSYS. The one thing
    that's still a puzzle is how to send a CDO.Message so that it shows up with a
    high importance/priority flag. I've been googling all morning and have tried
    a couple dozen different things that various pages say it the right way, but
    so far not a single one has worked.

    Never seen so many "answers" to what seems a basic question just so wrong
    before.

    Thanks
    Mark

    Mark Guest

  2. Similar Questions and Discussions

    1. Error Message When Sending Message In Windows Mail
      Am I the only one getting an error message when replying to a posted message using Windows Mail. Every time I send a message I get a popup error...
    2. sending an SMS message
      I'm pretty lost: I want to write a simple (???) program to send off an SMS message.. no ring tones or embedded pictures... just an app that'll...
    3. Data Grid Cell Vertical Scroll Bar. High Importance
      Hi guys, i have a problem in asp.net data grid. If u have a solution let m know. Problem is such that i have a data grid with 2 columns. Columns...
    4. Message not sending.. but why!?
      Hey all, I am experiencing this really bizzard problem with CDO and W2K. I have the following code in ASP: Dim objCDO set objCDO =...
    5. Error message on update statistics high
      On Wed, 30 Jul 2003 15:01:59 -0400, Francisco Roldan wrote: Or set PDQPRIORITY > 2 to sort in memory and set PSORT_NPROCS to invoke the parallel...
  3. #2

    Default RE: Sending a CDO.Message with high importance?

    Hi Mark,

    For setting the priority and importance header of message through CDOsys,
    I've performed some tests and here is a general function that send a
    message with high importance and urgent priority, it works on my
    side(sending to a local exchange server):

    ===================

    Dim oMsg As CDO.Message = New CDO.Message()
    Dim iConfg As CDO.Configuration
    Dim oFields As ADODB.Fields
    Dim oField As ADODB.Field

    iConfg = oMsg.Configuration
    oFields = iConfg.Fields

    oField =
    oFields("http://schemas.microsoft.com/cdo/configuration/sendusing")
    oField.Value = CDO.CdoSendUsing.cdoSendUsingPort

    ' port that the SMTP server is using.
    oField =
    oFields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
    oField.Value = 25


    ' TODO: Replace with your SMTP server.
    oField =
    oFields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
    oField.Value = "smtpserver"


    oField =
    oFields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")
    oField.Value = 2 'use NTLM AUTH

    oFields.Update()
    oMsg.Configuration = iConfg

    oMsg.TextBody = "Test message body."
    oMsg.Subject = "Test SMTP Message Send using port"
    oMsg.From = "test@microsoft.com"
    oMsg.To = "test@microsoft.com"



    oMsg.Fields.Item("urn:schemas:mailheader:importanc e").Value =
    "high" 'you can set [high,normal,low] for this field
    oMsg.Fields.Item("urn:schemas:mailheader:priority" ).Value = 1 'you
    can set [1, 0 , -1] for this field

    oMsg.Fields.Update()

    oMsg.Send()

    oMsg = Nothing
    iConfg = Nothing
    oFields = Nothing
    oField = Nothing

    MessageBox.Show("mail sent!")

    End Sub
    =======================

    Hope this helps.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    [url]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif[/url]
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    [url]http://msdn.microsoft.com/subscriptions/support/default.aspx[/url].

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    >From: =?Utf-8?B?TWFyaw==?= <mmodrall@nospam.nospam>
    >Subject: Sending a CDO.Message with high importance?
    >Date: Wed, 5 Mar 2008 09:37:07 -0800
    >Okay... Thought I'd try to move away from CDONTS to CDOSYS. The one
    thing
    >that's still a puzzle is how to send a CDO.Message so that it shows up
    with a
    >high importance/priority flag. I've been googling all morning and have
    tried
    >a couple dozen different things that various pages say it the right way,
    but
    >so far not a single one has worked.
    >
    >Never seen so many "answers" to what seems a basic question just so wrong
    >before.
    >
    >Thanks
    >Mark
    >
    >
    Steven Cheng Guest

  4. #3

    Default RE: Sending a CDO.Message with high importance?

    Thanks Steven. That worked.

    Mark


    ""Steven Cheng"" wrote:
    > Hi Mark,
    >
    > For setting the priority and importance header of message through CDOsys,
    > I've performed some tests and here is a general function that send a
    > message with high importance and urgent priority, it works on my
    > side(sending to a local exchange server):
    >
    > ===================
    >
    > Dim oMsg As CDO.Message = New CDO.Message()
    > Dim iConfg As CDO.Configuration
    > Dim oFields As ADODB.Fields
    > Dim oField As ADODB.Field
    >
    > iConfg = oMsg.Configuration
    > oFields = iConfg.Fields
    >
    > oField =
    > oFields("http://schemas.microsoft.com/cdo/configuration/sendusing")
    > oField.Value = CDO.CdoSendUsing.cdoSendUsingPort
    >
    > ' port that the SMTP server is using.
    > oField =
    > oFields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
    > oField.Value = 25
    >
    >
    > ' TODO: Replace with your SMTP server.
    > oField =
    > oFields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
    > oField.Value = "smtpserver"
    >
    >
    > oField =
    > oFields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")
    > oField.Value = 2 'use NTLM AUTH
    >
    > oFields.Update()
    > oMsg.Configuration = iConfg
    >
    > oMsg.TextBody = "Test message body."
    > oMsg.Subject = "Test SMTP Message Send using port"
    > oMsg.From = "test@microsoft.com"
    > oMsg.To = "test@microsoft.com"
    >
    >
    >
    > oMsg.Fields.Item("urn:schemas:mailheader:importanc e").Value =
    > "high" 'you can set [high,normal,low] for this field
    > oMsg.Fields.Item("urn:schemas:mailheader:priority" ).Value = 1 'you
    > can set [1, 0 , -1] for this field
    >
    > oMsg.Fields.Update()
    >
    > oMsg.Send()
    >
    > oMsg = Nothing
    > iConfg = Nothing
    > oFields = Nothing
    > oField = Nothing
    >
    > MessageBox.Show("mail sent!")
    >
    > End Sub
    > =======================
    >
    > Hope this helps.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    >
    > ==================================================
    >
    > Get notification to my posts through email? Please refer to
    > [url]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif[/url]
    > ications.
    >
    >
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > [url]http://msdn.microsoft.com/subscriptions/support/default.aspx[/url].
    >
    > ==================================================
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    > --------------------
    > >From: =?Utf-8?B?TWFyaw==?= <mmodrall@nospam.nospam>
    > >Subject: Sending a CDO.Message with high importance?
    > >Date: Wed, 5 Mar 2008 09:37:07 -0800
    >
    > >Okay... Thought I'd try to move away from CDONTS to CDOSYS. The one
    > thing
    > >that's still a puzzle is how to send a CDO.Message so that it shows up
    > with a
    > >high importance/priority flag. I've been googling all morning and have
    > tried
    > >a couple dozen different things that various pages say it the right way,
    > but
    > >so far not a single one has worked.
    > >
    > >Never seen so many "answers" to what seems a basic question just so wrong
    > >before.
    > >
    > >Thanks
    > >Mark
    > >
    > >
    >
    >
    Mark Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139