472,956 Members | 2,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,956 software developers and data experts.

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
Us***@here.whatever and Us***@here.whatever but if "Loaded" is chosen
it needs to email Us***@here.whatever and Us***@here.whatever, etc,
etc...

I'm aware that the only thing that really needs to change is the
"Mail.AddAddress" 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.CreateObject("Persits.MailSender")
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='Conversions'>CONVERSIONS</option>"
Response.Write "<option value='Drivers'>DRIVER TEAM</option>"
Response.Write "<option value='Inspections'>INSPECTIONS</option>"
Response.Write "<option value='Invoiced'>INVOICED</option>"
Response.Write "<option value='Label'>LABEL REPLACES</option>"
Response.Write "<option value='Loaded'>LOADED</option>"
Response.Write "<option value='Located'>LOCATED STATUS</option>"
Response.Write "<option value='Manifested'>MANIFESTED</option>"
Response.Write "<option value='Other'>OTHER</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='Receiving'>RECEIVING</option>"
Response.Write "<option value='Shorts'>SHORTS</option>"
Response.Write "<option value='Test'>TEST</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....)
Jul 21 '05 #1
4 2959
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=Server.CreateObject("ADODB.Connection")
....
Set rsEmail=Server.CreateObject("ADODB.Recordset")
....
Set Mail = Server.CreateObject("Persits.MailSender")
.....

End Sub


"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
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
Us***@here.whatever and Us***@here.whatever but if "Loaded" is chosen
it needs to email Us***@here.whatever and Us***@here.whatever, etc,
etc...

I'm aware that the only thing that really needs to change is the
"Mail.AddAddress" 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.CreateObject("Persits.MailSender")
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='Conversions'>CONVERSIONS</option>"
Response.Write "<option value='Drivers'>DRIVER TEAM</option>"
Response.Write "<option value='Inspections'>INSPECTIONS</option>"
Response.Write "<option value='Invoiced'>INVOICED</option>"
Response.Write "<option value='Label'>LABEL REPLACES</option>"
Response.Write "<option value='Loaded'>LOADED</option>"
Response.Write "<option value='Located'>LOCATED STATUS</option>"
Response.Write "<option value='Manifested'>MANIFESTED</option>"
Response.Write "<option value='Other'>OTHER</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='Receiving'>RECEIVING</option>"
Response.Write "<option value='Shorts'>SHORTS</option>"
Response.Write "<option value='Test'>TEST</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....)

Jul 21 '05 #2
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:<u9**************@TK2MSFTNGP14.phx.gbl>...
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=Server.CreateObject("ADODB.Connection")
...
Set rsEmail=Server.CreateObject("ADODB.Recordset")
...
Set Mail = Server.CreateObject("Persits.MailSender")
....

End Sub


"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
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
Us***@here.whatever and Us***@here.whatever but if "Loaded" is chosen
it needs to email Us***@here.whatever and Us***@here.whatever, etc,
etc...

I'm aware that the only thing that really needs to change is the
"Mail.AddAddress" 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.CreateObject("Persits.MailSender")
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='Conversions'>CONVERSIONS</option>"
Response.Write "<option value='Drivers'>DRIVER TEAM</option>"
Response.Write "<option value='Inspections'>INSPECTIONS</option>"
Response.Write "<option value='Invoiced'>INVOICED</option>"
Response.Write "<option value='Label'>LABEL REPLACES</option>"
Response.Write "<option value='Loaded'>LOADED</option>"
Response.Write "<option value='Located'>LOCATED STATUS</option>"
Response.Write "<option value='Manifested'>MANIFESTED</option>"
Response.Write "<option value='Other'>OTHER</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='Receiving'>RECEIVING</option>"
Response.Write "<option value='Shorts'>SHORTS</option>"
Response.Write "<option value='Test'>TEST</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....)

Jul 21 '05 #3
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?
"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
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:<u9**************@TK2MSFTNGP14.phx.gbl>...
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=Server.CreateObject("ADODB.Connection")
...
Set rsEmail=Server.CreateObject("ADODB.Recordset")
...
Set Mail = Server.CreateObject("Persits.MailSender")
....

End Sub


"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
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
Us***@here.whatever and Us***@here.whatever but if "Loaded" is chosen
it needs to email Us***@here.whatever and Us***@here.whatever, etc,
etc...

I'm aware that the only thing that really needs to change is the
"Mail.AddAddress" 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.CreateObject("Persits.MailSender")
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='Conversions'>CONVERSIONS</option>"
Response.Write "<option value='Drivers'>DRIVER TEAM</option>"
Response.Write "<option value='Inspections'>INSPECTIONS</option>"
Response.Write "<option value='Invoiced'>INVOICED</option>"
Response.Write "<option value='Label'>LABEL REPLACES</option>"
Response.Write "<option value='Loaded'>LOADED</option>"
Response.Write "<option value='Located'>LOCATED STATUS</option>"
Response.Write "<option value='Manifested'>MANIFESTED</option>"
Response.Write "<option value='Other'>OTHER</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='Receiving'>RECEIVING</option>"
Response.Write "<option value='Shorts'>SHORTS</option>"
Response.Write "<option value='Test'>TEST</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....)

Jul 21 '05 #4
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....This 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.AddAddress" line and one per Mail.AddCC...Grrr....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.....Here'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_Archives/wh.mdb"

<code>

<!-- #INCLUDE VIRTUAL="/_borders/top_nav.asp" -->
<%
Mode = request("mode")
Carton = request.form("carton")
Comments = request.form("comments")
Name = request.form("name")
Reason = request("reason")
Shift = request.form("shift")
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 = "dm**********@gmail.com"

'************************************************* ****************************
'* FORM FOR DATA INPUT
*
'************************************************* ****************************
Sub Form()
Response.Write "<form method='POST' action='verification.asp'
name='verify' onSubmit='validate()'>"
Response.Write "&nbsp;<div align='left'>"
Response.Write "<table border='0' cellpadding='0' width='976'>"
Response.Write "<tr>"
Response.Write "<td width='141'>Name :</td>"
Response.Write "<td width='784'><input 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'><input type='radio' name='shift'
value='Day'>Day Shift"
Response.Write "<input type='radio' name='shift' value='Night'>Night
Shift</td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td width='141'>Carton Number:</td>"
Response.Write "<td width='784'><input type='text' name='carton'
size='20'></td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td width='141'>Reason:</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='Conversions'>CONVERSIONS</option>"
Response.Write "<option value='Drivers'>DRIVER TEAM</option>"
Response.Write "<option value='Inspections'>INSPECTIONS</option>"
Response.Write "<option value='Invoiced'>INVOICED</option>"
Response.Write "<option value='Label'>LABEL REPLACES</option>"
Response.Write "<option value='Loaded'>LOADED</option>"
Response.Write "<option value='Located'>LOCATED STATUS</option>"
Response.Write "<option value='Manifested'>MANIFESTED</option>"
Response.Write "<option value='Other'>OTHER</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='Receiving'>RECEIVING</option>"
Response.Write "<option value='Shorts'>SHORTS</option>"
Response.Write "<option value='Test'>TEST</option>"
Response.Write "</select>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td width='141' valign='top'>Comments:</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'>&nbsp;</td>"
Response.Write "<td width='784'>&nbsp;</td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td width='141' valign='top'>&nbsp;</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.CreateObject("ADODB.Connection")

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

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

'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.CreateObject("Persits.MailSender")
Mail.Host = "gwfs1" ' Specify a valid SMTP server
Mail.From = "***@***.com" ' Specify sender's address
Mail.FromName = "290 / 110 Verification" ' Specify sender's name
Mail.IsHTML = True
Mail.Subject = Reason

Select Case value
Case "Conversions"
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.servervariables("REMOTE_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'>Return to Warehouse
Operations</a></p>"

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

</code>
"Mike" <me@here.com> wrote in message news:<uW**************@TK2MSFTNGP14.phx.gbl>...
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?
"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
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:<u9**************@TK2MSFTNGP14.phx.gbl>...
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=Server.CreateObject("ADODB.Connection")
...
Set rsEmail=Server.CreateObject("ADODB.Recordset")
...
Set Mail = Server.CreateObject("Persits.MailSender")
....

End Sub


"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
> 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
> Us***@here.whatever and Us***@here.whatever but if "Loaded" is chosen
> it needs to email Us***@here.whatever and Us***@here.whatever, etc,
> etc...
>
> I'm aware that the only thing that really needs to change is the
> "Mail.AddAddress" 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.CreateObject("Persits.MailSender")
> 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='Conversions'>CONVERSIONS</option>"
> Response.Write "<option value='Drivers'>DRIVER TEAM</option>"
> Response.Write "<option value='Inspections'>INSPECTIONS</option>"
> Response.Write "<option value='Invoiced'>INVOICED</option>"
> Response.Write "<option value='Label'>LABEL REPLACES</option>"
> Response.Write "<option value='Loaded'>LOADED</option>"
> Response.Write "<option value='Located'>LOCATED STATUS</option>"
> Response.Write "<option value='Manifested'>MANIFESTED</option>"
> Response.Write "<option value='Other'>OTHER</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='Receiving'>RECEIVING</option>"
> Response.Write "<option value='Shorts'>SHORTS</option>"
> Response.Write "<option value='Test'>TEST</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....)

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Maggie Blue | last post by:
Hi! Total "newbie to programming" here. I'm using Jack's Formmail.php, code at: http://www.dtheatre.com/scripts/source_view.php?path=formmail_code/formmail.phps and I'm trying to figure out...
0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
2
by: Alex Hunsley | last post by:
I'm using the smtp module to send emails from python. I would like to specify several recipients of the email like follows: msg = MIMEText(time.ctime("Body text of email") me =...
1
by: Erica | last post by:
This has been hanging over my head for months, so I hope it's not something silly. I've created a Perl script where I have to send an email with multiple bcc's via sendmail. If I have one bcc...
15
by: news.microsoft.com | last post by:
HI, ASPEmail to send to multiple recipients? I tried to use comma and semicolon but all the time give this message error: Error: 6 - 501 Bad address syntax nor :...
2
by: .Net Newbie | last post by:
Hello, I am currently coding my ASP.Net pages in c# and have run into a question concerning Emails. I have four objects on a page (six including 2 buttons). The first is a subject line...
14
by: Mattia | last post by:
I have a very big problem. I must send a single mail to multiple receivers. The number of receivers are very big: approximately 6000 users, but this number increase each year. I find a lot of...
4
by: sck10 | last post by:
Hello, I am trying to send email to 4 people (str01 = "p1.mysite.com,p2.mysite.com,p3.mysite.com") using the following: Dim addrFrom As New MailAddress(str00) Dim addrTo As New...
8
by: Jimbo | last post by:
Hello I am currently designing an internal ordering system for IT equipment. I am designing it in ASP.NET (vb) using Visual Studio 2003 and using Microsoft SQL Server I have got the system...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.