Multiple Email Recipients depending on Value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dmiller23462

    Multiple Email Recipients depending on Value

    So here's my problem.....I need to set up different email
    distributions based on which option in the following Select form has
    been chosen....For instance if "Putaway" is chosen it needs to email
    User1@here.whatever and User4@here.whatever but if "Loaded" is chosen
    it needs to email User2@here.whatever and User3@here.whatever, etc,
    etc...

    I'm aware that the only thing that really needs to change is the
    "Mail.AddAddres s" line (at least in my own mind that seems
    correct).....I was just kind of hoping to have something along the
    lines of ;

    Set Mail = Server.CreateOb ject("Persits.M ailSender")
    Mail.Host = "xxxx"
    Mail.From = "me@me.com"
    Mail.FromName = "Test"
    Mail.IsHTML = True
    Mail.Subject = Reason

    If Reason = Putaway Then
    Mail.AddAddress User1Variable
    Mail.AddAddress User4Variable
    ElseIf Reason = Loaded Then
    Mail.AddAddress User2Variable
    Mail.AddAddress User3Variable
    End If

    Hopefully you understand the gist of what I'm attempting....I know
    that an ElseIf statement may not be the best method but that's why I'm
    posting...

    Here's the Select that I refer to....

    Response.Write "<select size='1' name='reason' tabindex='8'>"
    Response.Write "<option value='Putaway' >CASE PUTAWAY</option>"
    Response.Write "<option value='Conversi ons'>CONVERSION S</option>"
    Response.Write "<option value='Drivers' >DRIVER TEAM</option>"
    Response.Write "<option value='Inspecti ons'>INSPECTION S</option>"
    Response.Write "<option value='Invoiced '>INVOICED</option>"
    Response.Write "<option value='Label'>L ABEL REPLACES</option>"
    Response.Write "<option value='Loaded'> LOADED</option>"
    Response.Write "<option value='Located' >LOCATED STATUS</option>"
    Response.Write "<option value='Manifest ed'>MANIFESTED</option>"
    Response.Write "<option value='Other'>O THER</option>"
    Response.Write "<option value='Packed'> PACKED STATUS</option>"
    Response.Write "<option value='Pending' >PENDING LOCATION
    PUTAWAY</option>"
    Response.Write "<option value='Picking' >PICKING</option>"
    Response.Write "<option value='Receivin g'>RECEIVING</option>"
    Response.Write "<option value='Shorts'> SHORTS</option>"
    Response.Write "<option value='Test'>TE ST</option>"
    Response.Write "</select>"

    Any suggestions/advice/pointers/URLs would be extremely helpful...(I
    haven't posted the code in its entirety, only what I think you could
    use to look at...If you want the entire length of code, please let me
    know and I'll post it if necessary....)
  • Mike

    #2
    Re: Multiple Email Recipients depending on Value

    How about a lookup table in a DB to hold all of the options and the email
    addresses that relate to it.
    Then create a sub with the option selected to be passed in as a variable...?
    In the sub, you'll loop through all of the email addresses that have been
    return based on the user's option selection.
    Does this help?

    Sub EmailOption (sOption)

    Set ConnEmail=Serve r.CreateObject( "ADODB.Connecti on")
    ....
    Set rsEmail=Server. CreateObject("A DODB.Recordset" )
    ....
    Set Mail = Server.CreateOb ject("Persits.M ailSender")
    .....

    End Sub




    "dmiller234 62" <dmiller23462@y ahoo.com> wrote in message
    news:591ac515.0 410280552.680f6 e9e@posting.goo gle.com...[color=blue]
    > So here's my problem.....I need to set up different email
    > distributions based on which option in the following Select form has
    > been chosen....For instance if "Putaway" is chosen it needs to email
    > User1@here.whatever and User4@here.whatever but if "Loaded" is chosen
    > it needs to email User2@here.whatever and User3@here.whatever, etc,
    > etc...
    >
    > I'm aware that the only thing that really needs to change is the
    > "Mail.AddAddres s" line (at least in my own mind that seems
    > correct).....I was just kind of hoping to have something along the
    > lines of ;
    >
    > Set Mail = Server.CreateOb ject("Persits.M ailSender")
    > Mail.Host = "xxxx"
    > Mail.From = "me@me.com"
    > Mail.FromName = "Test"
    > Mail.IsHTML = True
    > Mail.Subject = Reason
    >
    > If Reason = Putaway Then
    > Mail.AddAddress User1Variable
    > Mail.AddAddress User4Variable
    > ElseIf Reason = Loaded Then
    > Mail.AddAddress User2Variable
    > Mail.AddAddress User3Variable
    > End If
    >
    > Hopefully you understand the gist of what I'm attempting....I know
    > that an ElseIf statement may not be the best method but that's why I'm
    > posting...
    >
    > Here's the Select that I refer to....
    >
    > Response.Write "<select size='1' name='reason' tabindex='8'>"
    > Response.Write "<option value='Putaway' >CASE PUTAWAY</option>"
    > Response.Write "<option value='Conversi ons'>CONVERSION S</option>"
    > Response.Write "<option value='Drivers' >DRIVER TEAM</option>"
    > Response.Write "<option value='Inspecti ons'>INSPECTION S</option>"
    > Response.Write "<option value='Invoiced '>INVOICED</option>"
    > Response.Write "<option value='Label'>L ABEL REPLACES</option>"
    > Response.Write "<option value='Loaded'> LOADED</option>"
    > Response.Write "<option value='Located' >LOCATED STATUS</option>"
    > Response.Write "<option value='Manifest ed'>MANIFESTED</option>"
    > Response.Write "<option value='Other'>O THER</option>"
    > Response.Write "<option value='Packed'> PACKED STATUS</option>"
    > Response.Write "<option value='Pending' >PENDING LOCATION
    > PUTAWAY</option>"
    > Response.Write "<option value='Picking' >PICKING</option>"
    > Response.Write "<option value='Receivin g'>RECEIVING</option>"
    > Response.Write "<option value='Shorts'> SHORTS</option>"
    > Response.Write "<option value='Test'>TE ST</option>"
    > Response.Write "</select>"
    >
    > Any suggestions/advice/pointers/URLs would be extremely helpful...(I
    > haven't posted the code in its entirety, only what I think you could
    > use to look at...If you want the entire length of code, please let me
    > know and I'll post it if necessary....)[/color]


    Comment

    • dmiller23462

      #3
      Re: Multiple Email Recipients depending on Value

      Thanks for the reply, Mike....

      Please forgive my ignorance (I'm still getting my head around ASP) but
      since I've only got a total of 10 email addresses, I'll just make a
      separate table in an Access DB for this (that's what your suggestions
      sounds like to me) I'm not quite sure how I can incorporate RecordSets
      (I use those for query-type pages so I have those figured out) into
      the Persits email object.....

      Basically I'm wondering how the mail object will know exactly which
      email address to use.....Any more help?

      "Mike" <me@here.com> wrote in message news:<u9irhETvE HA.2116@TK2MSFT NGP14.phx.gbl>. ..[color=blue]
      > How about a lookup table in a DB to hold all of the options and the email
      > addresses that relate to it.
      > Then create a sub with the option selected to be passed in as a variable...?
      > In the sub, you'll loop through all of the email addresses that have been
      > return based on the user's option selection.
      > Does this help?
      >
      > Sub EmailOption (sOption)
      >
      > Set ConnEmail=Serve r.CreateObject( "ADODB.Connecti on")
      > ...
      > Set rsEmail=Server. CreateObject("A DODB.Recordset" )
      > ...
      > Set Mail = Server.CreateOb ject("Persits.M ailSender")
      > ....
      >
      > End Sub
      >
      >
      >
      >
      > "dmiller234 62" <dmiller23462@y ahoo.com> wrote in message
      > news:591ac515.0 410280552.680f6 e9e@posting.goo gle.com...[color=green]
      > > So here's my problem.....I need to set up different email
      > > distributions based on which option in the following Select form has
      > > been chosen....For instance if "Putaway" is chosen it needs to email
      > > User1@here.whatever and User4@here.whatever but if "Loaded" is chosen
      > > it needs to email User2@here.whatever and User3@here.whatever, etc,
      > > etc...
      > >
      > > I'm aware that the only thing that really needs to change is the
      > > "Mail.AddAddres s" line (at least in my own mind that seems
      > > correct).....I was just kind of hoping to have something along the
      > > lines of ;
      > >
      > > Set Mail = Server.CreateOb ject("Persits.M ailSender")
      > > Mail.Host = "xxxx"
      > > Mail.From = "me@me.com"
      > > Mail.FromName = "Test"
      > > Mail.IsHTML = True
      > > Mail.Subject = Reason
      > >
      > > If Reason = Putaway Then
      > > Mail.AddAddress User1Variable
      > > Mail.AddAddress User4Variable
      > > ElseIf Reason = Loaded Then
      > > Mail.AddAddress User2Variable
      > > Mail.AddAddress User3Variable
      > > End If
      > >
      > > Hopefully you understand the gist of what I'm attempting....I know
      > > that an ElseIf statement may not be the best method but that's why I'm
      > > posting...
      > >
      > > Here's the Select that I refer to....
      > >
      > > Response.Write "<select size='1' name='reason' tabindex='8'>"
      > > Response.Write "<option value='Putaway' >CASE PUTAWAY</option>"
      > > Response.Write "<option value='Conversi ons'>CONVERSION S</option>"
      > > Response.Write "<option value='Drivers' >DRIVER TEAM</option>"
      > > Response.Write "<option value='Inspecti ons'>INSPECTION S</option>"
      > > Response.Write "<option value='Invoiced '>INVOICED</option>"
      > > Response.Write "<option value='Label'>L ABEL REPLACES</option>"
      > > Response.Write "<option value='Loaded'> LOADED</option>"
      > > Response.Write "<option value='Located' >LOCATED STATUS</option>"
      > > Response.Write "<option value='Manifest ed'>MANIFESTED</option>"
      > > Response.Write "<option value='Other'>O THER</option>"
      > > Response.Write "<option value='Packed'> PACKED STATUS</option>"
      > > Response.Write "<option value='Pending' >PENDING LOCATION
      > > PUTAWAY</option>"
      > > Response.Write "<option value='Picking' >PICKING</option>"
      > > Response.Write "<option value='Receivin g'>RECEIVING</option>"
      > > Response.Write "<option value='Shorts'> SHORTS</option>"
      > > Response.Write "<option value='Test'>TE ST</option>"
      > > Response.Write "</select>"
      > >
      > > Any suggestions/advice/pointers/URLs would be extremely helpful...(I
      > > haven't posted the code in its entirety, only what I think you could
      > > use to look at...If you want the entire length of code, please let me
      > > know and I'll post it if necessary....)[/color][/color]

      Comment

      • Mike

        #4
        Re: Multiple Email Recipients depending on Value

        Sorry, I guess I didn't pay enough attention to your post....And - I just
        figured out that MailSender is a 3rd party component.

        Anyways, regardless of # of email address, I think it would still be a good
        idea to put those into a DB - so you can easily change them later and won't
        have to change the actual source code in the asp page.

        What I'm suggesting is to create a table with all of your Options. Then,
        create another table that has email address; where each email address has a
        link to the Options table (thus, every email address will have an
        associated/linked option to it) Or, you can simply create one Table if you
        don't have that much information and aren't concerned about Table
        normalization.
        Now, when you call the function (with the selected Option (sOption)), you
        create a recordset that grabs all emails with Option as the criteria. Maybe
        something like... - "Select EmailAddress from tblEmail WHERE Option ='" &
        sOption & "';"
        You can now loop through all of the emails in the recordset. I don't know
        how the MailSender works, but you can loop through this email recordset to
        create an EmailTo address string (separated by a coma), or send out
        individual emails to each person within the loop structure.

        This make sense?


        "dmiller234 62" <dmiller23462@y ahoo.com> wrote in message
        news:591ac515.0 410290223.547f0 c88@posting.goo gle.com...[color=blue]
        > Thanks for the reply, Mike....
        >
        > Please forgive my ignorance (I'm still getting my head around ASP) but
        > since I've only got a total of 10 email addresses, I'll just make a
        > separate table in an Access DB for this (that's what your suggestions
        > sounds like to me) I'm not quite sure how I can incorporate RecordSets
        > (I use those for query-type pages so I have those figured out) into
        > the Persits email object.....
        >
        > Basically I'm wondering how the mail object will know exactly which
        > email address to use.....Any more help?
        >
        > "Mike" <me@here.com> wrote in message[/color]
        news:<u9irhETvE HA.2116@TK2MSFT NGP14.phx.gbl>. ..[color=blue][color=green]
        > > How about a lookup table in a DB to hold all of the options and the[/color][/color]
        email[color=blue][color=green]
        > > addresses that relate to it.
        > > Then create a sub with the option selected to be passed in as a[/color][/color]
        variable...?[color=blue][color=green]
        > > In the sub, you'll loop through all of the email addresses that have[/color][/color]
        been[color=blue][color=green]
        > > return based on the user's option selection.
        > > Does this help?
        > >
        > > Sub EmailOption (sOption)
        > >
        > > Set ConnEmail=Serve r.CreateObject( "ADODB.Connecti on")
        > > ...
        > > Set rsEmail=Server. CreateObject("A DODB.Recordset" )
        > > ...
        > > Set Mail = Server.CreateOb ject("Persits.M ailSender")
        > > ....
        > >
        > > End Sub
        > >
        > >
        > >
        > >
        > > "dmiller234 62" <dmiller23462@y ahoo.com> wrote in message
        > > news:591ac515.0 410280552.680f6 e9e@posting.goo gle.com...[color=darkred]
        > > > So here's my problem.....I need to set up different email
        > > > distributions based on which option in the following Select form has
        > > > been chosen....For instance if "Putaway" is chosen it needs to email
        > > > User1@here.whatever and User4@here.whatever but if "Loaded" is chosen
        > > > it needs to email User2@here.whatever and User3@here.whatever, etc,
        > > > etc...
        > > >
        > > > I'm aware that the only thing that really needs to change is the
        > > > "Mail.AddAddres s" line (at least in my own mind that seems
        > > > correct).....I was just kind of hoping to have something along the
        > > > lines of ;
        > > >
        > > > Set Mail = Server.CreateOb ject("Persits.M ailSender")
        > > > Mail.Host = "xxxx"
        > > > Mail.From = "me@me.com"
        > > > Mail.FromName = "Test"
        > > > Mail.IsHTML = True
        > > > Mail.Subject = Reason
        > > >
        > > > If Reason = Putaway Then
        > > > Mail.AddAddress User1Variable
        > > > Mail.AddAddress User4Variable
        > > > ElseIf Reason = Loaded Then
        > > > Mail.AddAddress User2Variable
        > > > Mail.AddAddress User3Variable
        > > > End If
        > > >
        > > > Hopefully you understand the gist of what I'm attempting....I know
        > > > that an ElseIf statement may not be the best method but that's why I'm
        > > > posting...
        > > >
        > > > Here's the Select that I refer to....
        > > >
        > > > Response.Write "<select size='1' name='reason' tabindex='8'>"
        > > > Response.Write "<option value='Putaway' >CASE PUTAWAY</option>"
        > > > Response.Write "<option value='Conversi ons'>CONVERSION S</option>"
        > > > Response.Write "<option value='Drivers' >DRIVER TEAM</option>"
        > > > Response.Write "<option value='Inspecti ons'>INSPECTION S</option>"
        > > > Response.Write "<option value='Invoiced '>INVOICED</option>"
        > > > Response.Write "<option value='Label'>L ABEL REPLACES</option>"
        > > > Response.Write "<option value='Loaded'> LOADED</option>"
        > > > Response.Write "<option value='Located' >LOCATED STATUS</option>"
        > > > Response.Write "<option value='Manifest ed'>MANIFESTED</option>"
        > > > Response.Write "<option value='Other'>O THER</option>"
        > > > Response.Write "<option value='Packed'> PACKED STATUS</option>"
        > > > Response.Write "<option value='Pending' >PENDING LOCATION
        > > > PUTAWAY</option>"
        > > > Response.Write "<option value='Picking' >PICKING</option>"
        > > > Response.Write "<option value='Receivin g'>RECEIVING</option>"
        > > > Response.Write "<option value='Shorts'> SHORTS</option>"
        > > > Response.Write "<option value='Test'>TE ST</option>"
        > > > Response.Write "</select>"
        > > >
        > > > Any suggestions/advice/pointers/URLs would be extremely helpful...(I
        > > > haven't posted the code in its entirety, only what I think you could
        > > > use to look at...If you want the entire length of code, please let me
        > > > know and I'll post it if necessary....)[/color][/color][/color]


        Comment

        • dmiller23462

          #5
          Re: Multiple Email Recipients depending on Value

          Let me first off apologize for the delay in my response.....I' m "the
          go-to guy" which means that I am ALWAYS busy with something....Th is is
          the first time I've been able to sit down again with this and take a
          gander....

          Here's the rundown again;
          I have actually made an Access db and I have put in fields that
          contain the email address and then also something like a grid with
          yes/no entries so I can run a SQL statement (SELECT * FROM verify
          WHERE conversions is yes....example) but the problem I''ll still have
          is that Persits (the email component) only allows for one address per
          "Mail.AddAddres s" line and one per Mail.AddCC...Gr rr....So I can't
          make a large mailing list (which is actually what I need to do...all
          people fitting a particular category should get emailed...)

          Please take a look and possibly jump-start my brain into heading the
          right direction.....H ere's the code again.....It's pretty rough, I'd
          been trying to think of how to go about making up these mailing
          lists...By the way, the db that contains the emails is
          "/jax/wh/Online_Forms/Secured_Archive s/wh.mdb"

          <code>

          <!-- #INCLUDE VIRTUAL="/_borders/top_nav.asp" -->
          <%
          Mode = request("mode")
          Carton = request.form("c arton")
          Comments = request.form("c omments")
          Name = request.form("n ame")
          Reason = request("reason ")
          Shift = request.form("s hift")
          Alice** = "a*@***.com "
          Mary*** = "m*@***.com "
          Tracy*** = "t*@***.com "
          Rodney*** = "r*@***.com "
          Reginald*** = "r*@***.com "
          John*** = "j*@***.com "
          Toby*** = "t*@***.com "
          Shannon*** = "s*@***.com "
          Robin*** = "r*@***.com "
          Ken*** = "k*@***.com "
          Kim*** = "k*@***.com "
          Terry*** = "t*@**.com"
          Don*** = "d*@**.com"
          DaveTest1 = "dmiller@**.com "
          DaveTest2 = "dmiller23462@g mail.com"

          '************** *************** *************** *************** *************** ***
          '* FORM FOR DATA INPUT
          *
          '************** *************** *************** *************** *************** ***
          Sub Form()
          Response.Write "<form method='POST' action='verific ation.asp'
          name='verify' onSubmit='valid ate()'>"
          Response.Write "&nbsp;<div align='left'>"
          Response.Write "<table border='0' cellpadding='0' width='976'>"
          Response.Write "<tr>"
          Response.Write "<td width='141'>Nam e :</td>"
          Response.Write "<td width='784'><in put type='text' name='name'
          size='20'></td>"
          Response.Write "</tr>"
          Response.Write "<tr>"
          Response.Write "<td width='141'>Day / Night Shift</td>"
          Response.Write "<td width='357'><in put type='radio' name='shift'
          value='Day'>Day Shift"
          Response.Write "<input type='radio' name='shift' value='Night'>N ight
          Shift</td>"
          Response.Write "</tr>"
          Response.Write "<tr>"
          Response.Write "<td width='141'>Car ton Number:</td>"
          Response.Write "<td width='784'><in put type='text' name='carton'
          size='20'></td>"
          Response.Write "</tr>"
          Response.Write "<tr>"
          Response.Write "<td width='141'>Rea son:</td>"
          Response.Write "<td width='784'>"
          Response.Write "<select size='1' name='reason' tabindex='8'>"
          Response.Write "<option value='Putaway' >CASE PUTAWAY</option>"
          Response.Write "<option value='Conversi ons'>CONVERSION S</option>"
          Response.Write "<option value='Drivers' >DRIVER TEAM</option>"
          Response.Write "<option value='Inspecti ons'>INSPECTION S</option>"
          Response.Write "<option value='Invoiced '>INVOICED</option>"
          Response.Write "<option value='Label'>L ABEL REPLACES</option>"
          Response.Write "<option value='Loaded'> LOADED</option>"
          Response.Write "<option value='Located' >LOCATED STATUS</option>"
          Response.Write "<option value='Manifest ed'>MANIFESTED</option>"
          Response.Write "<option value='Other'>O THER</option>"
          Response.Write "<option value='Packed'> PACKED STATUS</option>"
          Response.Write "<option value='Pending' >PENDING LOCATION
          PUTAWAY</option>"
          Response.Write "<option value='Picking' >PICKING</option>"
          Response.Write "<option value='Receivin g'>RECEIVING</option>"
          Response.Write "<option value='Shorts'> SHORTS</option>"
          Response.Write "<option value='Test'>TE ST</option>"
          Response.Write "</select>"
          Response.Write "</tr>"
          Response.Write "<tr>"
          Response.Write "<td width='141' valign='top'>Co mments:</td>"
          Response.Write "<td width='784'>"
          Response.Write "<textarea rows='7' name='comments' wrap='hard'
          cols='54'></textarea></td>"
          Response.Write "</tr>"
          Response.Write "<tr>"
          Response.Write "<td width='141' valign='top'>&n bsp;</td>"
          Response.Write "<td width='784'>&nb sp;</td>"
          Response.Write "</tr>"
          Response.Write "<tr>"
          Response.Write "<td width='141' valign='top'>&n bsp;</td>"
          Response.Write "<td width='784'>"
          Response.Write "<input type='submit' value='Send Message'
          name='Send'></td>"
          Response.Write "</tr>"
          Response.Write "</table>"
          Response.Write "</div>"
          Response.Write "<input type='hidden' name='mode' value='Send'>"
          Response.Write "</form>"
          End Sub

          '************** *************** *************** *************** *************** ***
          '* DATABASE APPENDING
          *
          '************** *************** *************** *************** *************** ***
          Sub Database()
          'create db connection
          Set dbconn = Server.CreateOb ject("ADODB.Con nection")

          'open db in a DSN-less method
          dbconn.Open "PROVIDER=MICRO SOFT.JET.OLEDB. 4.0;DATA SOURCE="&
          Server.MapPath( "/jax/wh/Online_Forms/Secured_Archive s/search_files/shortage.mdb")

          'correct syntax for INSERT statement "INSERT INTO
          <tablename>(<fi eldname>) VALUES (<data>)"
          stateSQL = "INSERT INTO verify (name, shift, carton, reason,
          comments)" &_
          "VALUES ('" & Replace(name,"' ","''") & "','" & shift & "','" &
          Replace(carton, "'","''") & "','" &_
          reason & "','" & Replace(comment s,"'","''") & "')"

          'display results of statement on screen for testing purposes
          'Response.Write (stateSQL)

          'remind the SQL statement who it works for
          dbconn.Execute( stateSQL)

          'smack around the db connection until it lets go
          dbconn.Close

          'kill the connection with extreme prejudice
          set dbconn = nothing
          End Sub

          '************** *************** *************** *********
          '*FUNCTION TO EMAIL PEOPLE DEPENDING ON REASON CHOSEN*
          '************** *************** *************** *********
          Sub Email(value)
          Set Mail = Server.CreateOb ject("Persits.M ailSender")
          Mail.Host = "gwfs1" ' Specify a valid SMTP server
          Mail.From = "***@***.co m" ' Specify sender's address
          Mail.FromName = "290 / 110 Verification" ' Specify sender's name
          Mail.IsHTML = True
          Mail.Subject = Reason

          Select Case value
          Case "Conversion s"
          Mail.AddAddress DavePrivate
          Mail.AddCC
          Case "Test"
          Mail.AddAddress DaveMiller
          End Select

          Dim mail_body

          mail_body = "Name: " & Name & "<br>" &_
          "Shift: " & Shift & "<br>" &_
          "Carton: " & Carton & "<br>" &_
          "Reason: " & Reason & "<br>" &_
          "Comments: " & Comments & "<br>"

          mail.body = mail_body & "Submitted IP Address: " &
          request.serverv ariables("REMOT E_ADDR")

          On Error Resume Next
          Mail.Send
          If Err <> 0 Then
          Response.Write "Error encountered: " & Err.Description
          End If

          End Sub
          '************** *************** *************** *************** *************** ***
          '* CONFIRMATION PAGE AFTER ENTERING DATA
          *
          '************** *************** *************** *************** *************** ***
          Sub Confirm()
          Response.Write "<h2><img border='0'
          src='../../images/success.jpg'></h2>"
          Response.Write "<p>The following message has been successfully
          submitted!</p>"
          Response.Write "<p>Name: <font color='#0000FF' >" & Name &
          "</font><br>"
          Response.Write "Shift: <font color='#0000FF' >" & Shift &
          "</font><br>"
          Response.Write "Carton: <font color='#0000FF' >" & Carton &
          "</font><br>"
          Response.Write "Reason: <font color='#0000FF' >" & Reason &
          "</font><br>"
          Response.Write "Comments: <font color='#0000FF' >" & Comments &
          "</font></p>"
          Response.Write "<p>&nbsp;</p>"
          End Sub

          Response.Write "<p><img border='0'
          src='../../images/shortage.jpg'></p>"
          Response.Write "<title>290 / 110 Verification Form</title>"

          If Mode <> "Send" Then
          Call Form
          End If

          If Mode = "Send" Then
          Call Email(value)
          Call Database
          Call Confirm
          End If

          Response.Write "<p><a href='../default.asp'>Re turn to Warehouse
          Operations</a></p>"

          %><!-- #INCLUDE VIRTUAL="/_borders/bottom_nav.asp" -->

          </code>


          "Mike" <me@here.com> wrote in message news:<uWdE8rcvE HA.3152@TK2MSFT NGP14.phx.gbl>. ..[color=blue]
          > Sorry, I guess I didn't pay enough attention to your post....And - I just
          > figured out that MailSender is a 3rd party component.
          >
          > Anyways, regardless of # of email address, I think it would still be a good
          > idea to put those into a DB - so you can easily change them later and won't
          > have to change the actual source code in the asp page.
          >
          > What I'm suggesting is to create a table with all of your Options. Then,
          > create another table that has email address; where each email address has a
          > link to the Options table (thus, every email address will have an
          > associated/linked option to it) Or, you can simply create one Table if you
          > don't have that much information and aren't concerned about Table
          > normalization.
          > Now, when you call the function (with the selected Option (sOption)), you
          > create a recordset that grabs all emails with Option as the criteria. Maybe
          > something like... - "Select EmailAddress from tblEmail WHERE Option ='" &
          > sOption & "';"
          > You can now loop through all of the emails in the recordset. I don't know
          > how the MailSender works, but you can loop through this email recordset to
          > create an EmailTo address string (separated by a coma), or send out
          > individual emails to each person within the loop structure.
          >
          > This make sense?
          >
          >
          > "dmiller234 62" <dmiller23462@y ahoo.com> wrote in message
          > news:591ac515.0 410290223.547f0 c88@posting.goo gle.com...[color=green]
          > > Thanks for the reply, Mike....
          > >
          > > Please forgive my ignorance (I'm still getting my head around ASP) but
          > > since I've only got a total of 10 email addresses, I'll just make a
          > > separate table in an Access DB for this (that's what your suggestions
          > > sounds like to me) I'm not quite sure how I can incorporate RecordSets
          > > (I use those for query-type pages so I have those figured out) into
          > > the Persits email object.....
          > >
          > > Basically I'm wondering how the mail object will know exactly which
          > > email address to use.....Any more help?
          > >
          > > "Mike" <me@here.com> wrote in message[/color]
          > news:<u9irhETvE HA.2116@TK2MSFT NGP14.phx.gbl>. ..[color=green][color=darkred]
          > > > How about a lookup table in a DB to hold all of the options and the[/color][/color]
          > email[color=green][color=darkred]
          > > > addresses that relate to it.
          > > > Then create a sub with the option selected to be passed in as a[/color][/color]
          > variable...?[color=green][color=darkred]
          > > > In the sub, you'll loop through all of the email addresses that have[/color][/color]
          > been[color=green][color=darkred]
          > > > return based on the user's option selection.
          > > > Does this help?
          > > >
          > > > Sub EmailOption (sOption)
          > > >
          > > > Set ConnEmail=Serve r.CreateObject( "ADODB.Connecti on")
          > > > ...
          > > > Set rsEmail=Server. CreateObject("A DODB.Recordset" )
          > > > ...
          > > > Set Mail = Server.CreateOb ject("Persits.M ailSender")
          > > > ....
          > > >
          > > > End Sub
          > > >
          > > >
          > > >
          > > >
          > > > "dmiller234 62" <dmiller23462@y ahoo.com> wrote in message
          > > > news:591ac515.0 410280552.680f6 e9e@posting.goo gle.com...
          > > > > So here's my problem.....I need to set up different email
          > > > > distributions based on which option in the following Select form has
          > > > > been chosen....For instance if "Putaway" is chosen it needs to email
          > > > > User1@here.whatever and User4@here.whatever but if "Loaded" is chosen
          > > > > it needs to email User2@here.whatever and User3@here.whatever, etc,
          > > > > etc...
          > > > >
          > > > > I'm aware that the only thing that really needs to change is the
          > > > > "Mail.AddAddres s" line (at least in my own mind that seems
          > > > > correct).....I was just kind of hoping to have something along the
          > > > > lines of ;
          > > > >
          > > > > Set Mail = Server.CreateOb ject("Persits.M ailSender")
          > > > > Mail.Host = "xxxx"
          > > > > Mail.From = "me@me.com"
          > > > > Mail.FromName = "Test"
          > > > > Mail.IsHTML = True
          > > > > Mail.Subject = Reason
          > > > >
          > > > > If Reason = Putaway Then
          > > > > Mail.AddAddress User1Variable
          > > > > Mail.AddAddress User4Variable
          > > > > ElseIf Reason = Loaded Then
          > > > > Mail.AddAddress User2Variable
          > > > > Mail.AddAddress User3Variable
          > > > > End If
          > > > >
          > > > > Hopefully you understand the gist of what I'm attempting....I know
          > > > > that an ElseIf statement may not be the best method but that's why I'm
          > > > > posting...
          > > > >
          > > > > Here's the Select that I refer to....
          > > > >
          > > > > Response.Write "<select size='1' name='reason' tabindex='8'>"
          > > > > Response.Write "<option value='Putaway' >CASE PUTAWAY</option>"
          > > > > Response.Write "<option value='Conversi ons'>CONVERSION S</option>"
          > > > > Response.Write "<option value='Drivers' >DRIVER TEAM</option>"
          > > > > Response.Write "<option value='Inspecti ons'>INSPECTION S</option>"
          > > > > Response.Write "<option value='Invoiced '>INVOICED</option>"
          > > > > Response.Write "<option value='Label'>L ABEL REPLACES</option>"
          > > > > Response.Write "<option value='Loaded'> LOADED</option>"
          > > > > Response.Write "<option value='Located' >LOCATED STATUS</option>"
          > > > > Response.Write "<option value='Manifest ed'>MANIFESTED</option>"
          > > > > Response.Write "<option value='Other'>O THER</option>"
          > > > > Response.Write "<option value='Packed'> PACKED STATUS</option>"
          > > > > Response.Write "<option value='Pending' >PENDING LOCATION
          > > > > PUTAWAY</option>"
          > > > > Response.Write "<option value='Picking' >PICKING</option>"
          > > > > Response.Write "<option value='Receivin g'>RECEIVING</option>"
          > > > > Response.Write "<option value='Shorts'> SHORTS</option>"
          > > > > Response.Write "<option value='Test'>TE ST</option>"
          > > > > Response.Write "</select>"
          > > > >
          > > > > Any suggestions/advice/pointers/URLs would be extremely helpful...(I
          > > > > haven't posted the code in its entirety, only what I think you could
          > > > > use to look at...If you want the entire length of code, please let me
          > > > > know and I'll post it if necessary....)[/color][/color][/color]

          Comment

          Working...