ASP Email - clearing out a variable

Ask a Question related to ASP, Design and Development.

  1. #1

    Default ASP Email - clearing out a variable

    I've got this code:
    With cdoMessage
    Set .Configuration = cdoConfig
    .From = strEmail
    .To = "donald.duck@disney.com"
    .Cc = strmEmail
    .Subject = "Maintenance Request"
    .TextBody = strBody
    .Send
    End With

    With cdoMessage
    Set .Configuration = cdoConfig
    .From = "Maintenance_Form@disney.com"
    .To = strEmail
    .Subject = "Your Maintenance Request"
    .HtmlBody = emailBody
    .Send
    End With

    Now notice the second piece doesn't have .Cc, but they ( strmEmail from the
    first piece) are still getting the emails.
    How do I tell it not to send a .Cc?
    I have five different possible values for strmEmail, and whichever one I
    pick for the first part, shows up on the second, so I know it is passing the
    value, but I don't want it to.

    TIA!
    Tom


    Tom Petersen Guest

  2. Similar Questions and Discussions

    1. Clearing a variable in a database thru ASP
      Hello All I have a website which has login and logoff features. When some one logs in, I set a variable in the database to 1 and if he logs off,...
    2. Clearing cache?
      What does clearing the cache do? I've seen posts referring to this and wanted to know what this does. Does this compromise the computer at...
    3. Clearing ID numbers
      I am in the process of creating a new DB. I have inserted some records into a test form then deleted them and even when i try to create a new form...
    4. sorting/clearing
      i have a switchboard that i can open several different forms. one form allows me to select records to be displayed on a report through the use of...
    5. Clearing the stage
      I've just found out how to draw pixels on the stage on a mouseDown (thanks JohnAQ) with: on mouseDown clickedSprite = the clickOn if...
  3. #2

    Default Re: ASP Email - clearing out a variable

    ..Cc = "" will work. Either that, or you can destroy the cdoMessage object
    and recreate it. Or, use the same code and use a strCc variable, and just
    make sure you give it a value each time, whether that's "" or an e-mail
    address.

    Ray at work

    "Tom Petersen" <petert@sdsd.sdbor.edu> wrote in message
    news:%23p1x8FkmDHA.3256@tk2msftngp13.phx.gbl...
    > I've got this code:
    > With cdoMessage
    > Set .Configuration = cdoConfig
    > .From = strEmail
    > .To = "donald.duck@disney.com"
    > .Cc = strmEmail
    > .Subject = "Maintenance Request"
    > .TextBody = strBody
    > .Send
    > End With
    >
    > With cdoMessage
    > Set .Configuration = cdoConfig
    > .From = "Maintenance_Form@disney.com"
    > .To = strEmail
    > .Subject = "Your Maintenance Request"
    > .HtmlBody = emailBody
    > .Send
    > End With
    >
    > Now notice the second piece doesn't have .Cc, but they ( strmEmail from
    the
    > first piece) are still getting the emails.
    > How do I tell it not to send a .Cc?
    > I have five different possible values for strmEmail, and whichever one I
    > pick for the first part, shows up on the second, so I know it is passing
    the
    > value, but I don't want it to.
    >
    > TIA!
    > Tom
    >
    >

    Ray at Guest

  4. #3

    Default Re: ASP Email - clearing out a variable

    Destroy the object and re-create it. It's really keeping all of your
    configuration options, but you're over-writing most of them before hitting
    send.

    Or maybe you could try setting .cc = "" or to NULL?





    "Tom Petersen" <petert@sdsd.sdbor.edu> wrote in message
    news:#p1x8FkmDHA.3256@tk2msftngp13.phx.gbl...
    > I've got this code:
    > With cdoMessage
    > Set .Configuration = cdoConfig
    > .From = strEmail
    > .To = "donald.duck@disney.com"
    > .Cc = strmEmail
    > .Subject = "Maintenance Request"
    > .TextBody = strBody
    > .Send
    > End With
    >
    > With cdoMessage
    > Set .Configuration = cdoConfig
    > .From = "Maintenance_Form@disney.com"
    > .To = strEmail
    > .Subject = "Your Maintenance Request"
    > .HtmlBody = emailBody
    > .Send
    > End With
    >
    > Now notice the second piece doesn't have .Cc, but they ( strmEmail from
    the
    > first piece) are still getting the emails.
    > How do I tell it not to send a .Cc?
    > I have five different possible values for strmEmail, and whichever one I
    > pick for the first part, shows up on the second, so I know it is passing
    the
    > value, but I don't want it to.
    >
    > TIA!
    > Tom
    >
    >

    Aaron Bertrand [MVP] Guest

  5. #4

    Default Re: ASP Email - clearing out a variable

    Thanks guys!

    I'll play with both methods




    Tom Petersen 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