navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

ASP Mail - Multiple emails

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> ASP Mail - Multiple emails
Page: [1]
 
search

 

Posts: 4
From: MN
Status: offline

 
ASP Mail - Multiple emails - 3/23/2001 20:55:00   
I use ASP Mail and it works fine, but I want to generate a Database results region that has multiple email address' and then send the address'from a form to a page named broadcast.asp. Broadcast.asp has the ASP mail component that I want to send the same message to each individual email address. What happens is that it adds all the email information(from name, to name, from address) to one email and sends it to the first recipient. Here is the ASP MAIL code I am using:<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
'set the properties
Mailer.FromName = "careersearchweb.com"
Mailer.FromAddress = "admin@careersearchweb.com"
Mailer.AddRecipient Request.form("FirstName"),Request.Form("AppEmail")
Mailer.AddBCC "Chris Hansen", "admin@careersearchweb.com"
Mailer.RemoteHost = "careersearchweb.com"
Mailer.Subject = "New job posting sent from " & Request.form("Contact") & " at " & Request.form("Company")
Mailer.BodyText = "Hello " & Request.form("FirstName") & " " & Request.form("LastName") & "," & VbCrLf & Request.form("Email") & " sent you this job posting from careersearchweb.com" & VbCrLf & VbCrLf & Request.form("Page") & Request.form("JobNumber") & VbCrLf & VbCrLf & "Follow this link or copy and paste the URL into the address field in your web browser."
' send the mail
if Mailer.SendMail then
Response.Write "Mail Sent"
Else
Response.Write "Mail not sent" & Mailer.Response
End if
%>
What am I doing wrong?
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: ASP Mail - Multiple emails - 3/23/2001 14:52:00   
You say you are sending to a result generated from a database?

Are you sending the email to 1 address inputted by a form? or multiple email addresses extracted from a database.

You lost me a bit when you mentioned the form post.

You would need to be performing some sort of loop, but this is reliant on what input you have, either by form or database

------------------
Spooky
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!


(in reply to search)
search

 

Posts: 4
From: MN
Status: offline

 
RE: ASP Mail - Multiple emails - 3/23/2001 15:30:00   
Thanks for responding spooky

Yes, I am sending results generated by a database.

Yes, multiple email addresses extracted from a database.



(in reply to search)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: ASP Mail - Multiple emails - 3/23/2001 16:38:00   
So each person in the database receives a note?
Add the email script between the DRW dividers.

As each loop of the DRW is completed, an email will be sent to the unique email address supplied with each record.

Instead of Request.form("FirstName"),Request.Form("AppEmail")
you will use the database column value for email / first name

Thats using the FieldVal(fp_rs("")) that does the actual writing of values.


(in reply to search)
search

 

Posts: 4
From: MN
Status: offline

 
RE: ASP Mail - Multiple emails - 3/24/2001 13:24:00   
Thanks again Spooky.

I don't know what you mean by dividers so I attached the DRW. Can you tell me where to put the ASP Mail?

Thanks


<!--#include file="../../_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM Applications WHERE (CState = '::State::' AND JobTitle = '::JobTitle::' OR CState = '::State::' AND CJob1 = '::JobTitle::' OR CState = '::State::' AND CJob2 = '::JobTitle::' OR CState = '::State::' AND CJob3 = '::JobTitle::' OR CState = '::State::' AND CJob4 = '::JobTitle::' OR CState = '::State::' AND CJob5 = '::JobTitle::')"
fp_sDefault="State=&JobTitle=&State=&JobTitle=&State=&JobTitle=&State=&JobTitle=&State=&JobTitle=&State=&JobTitle="
fp_sNoRecords="No records returned."
fp_sDataConn="JobSearch"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="FirstName"
fp_sMenuValue="FirstName"
fp_iDisplayCols=139
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<table BORDER="0">
<tr>
<td><b>FirstName:</b></td>
<td><input NAME="FirstName" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"FirstName")%>"></td>
</tr>
<tr>
<td><b>LastName:</b></td>
<td><input NAME="LastName" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"LastName")%>"></td>
</tr>
<tr>
<td><b>AppEmail:</b></td>
<td><input NAME="AppEmail" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"AppEmail")%>"></td>
</tr>
<tr>
<td><b>Email:</b></td>
<td><input NAME="Email" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Email")%>"></td>
</tr>
</table>
<!--#include file="../../_fpclass/fpdbrgn2.inc"-->


(in reply to search)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> ASP Mail - Multiple emails
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts