%@LANGUAGE="VBSCRIPT"%>
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Spd E-Letter v4
' © 2001, 2002 PensaWorks, inc.
' For help with this program, please visit http://www.pensaworks.com
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Access = "User" : Nav3 = "1"
%>
<%
thisPage = "module_import_emails.asp"
on error resume next
response.buffer = true
server.scripttimeout = 1000
start = now
if request("action") = "go" then
action = 1
subData = request("subData")
if (IsNumeric(request("subListID"))) then listID = CInt(request("subListID")) else listID = 0
if not allowedList(listID, allowedLists) then response.redirect "message.asp?msg=49"
subFormat = request("subFormat")
if (lcase(subFormat) <> "text" AND lcase(subFormat) <> "html") then response.redirect "message.asp?msg=54"
subLines = split(subData, vbNewLine)
if err.number <> 0 then
IsErr = true
errDesc = err.description
errSource = err.source
errNum = err.number
else
IsErr = false
end if
end if
%>
<%=ListName%> - Spd E-Letter Administration
<%
if action = 1 then
if IsErr then
%>
|
ERROR!
The
following Error Data was received and may help in diagnosing the problem.
Error Number: <%=errNum%>
Error Source: <%=errSource%>
Error Description: <%=errDesc%>
If
the above states an 'Overflow' or 'Stack' error, please reduce the size
of your import.
|
<%
else
%>
<%
totCount = UBound(subLines)
addCount = 0
dupCount = 0
errCount = 0
emlCount = 0
delCount = 0
blkCount = 0
currClr = true
count = 0
for each subEmail in subLines
' for i = 0 to UBound(subLines)
' subEmail = subLines(i)
domain = split(subEmail, "@") : MLDomain = domain(UBound(domain))
if NOT verifyEmail(subEmail) then
mlRecError = "Invalid Email Address"
emlCount = emlCount + 1
else
set mlCheckDuplicates = mlConn.Execute("SELECT * FROM ML_Subscribers Where Email = '" & Replace(subEmail, "'", "''") & "' AND ListID = " & ListID)
if NOT mlCheckDuplicates.EOF then
mlRecError = "Already Subscribed"
dupCount = dupCount + 1
else
set blockedDomain = mlConn.Execute("SELECT * FROM ML_Blocked WHERE blkType = 0 and blkText = '" & replace(MLDomain, "'", "''") & "'")
if NOT blockedDomain.EOF then
mlRecError = "Banned Domain"
blkCount = blkCount + 1
else
mlConn.Execute("INSERT INTO ML_Subscribers (Name, Email, Format, ListID, SubscribedDate, numClicks, numReads, numBounces, numReplies, subRemoved, subRemovedDate, subMessageID) VALUES ('" & Replace(subName, "'", "''") & "','" & Replace(subEmail, "'", "''") & "','" & subFormat & "','" & ListID & "'," & cfgDate & ",0,0,0,0,0,0,0)")
addCount = addCount + 1
end if
set blockedDomain = nothing
end if
set mlCheckDuplicates = nothing
end if
if mlRecError <> "" then
currClr = not currClr
errCount = errCount + 1
%>
>| <%=subEmail%> | <%=mlRecError%> |
<%
end if
response.flush()
next
end if
if errCount = 0 then
currClr = not currClr
%>
<% end if %>
|
Subscriber Import Results
|
|
|
Subscriber
import completed in <%=DateDiff("s", start, Now)%> seconds.
<%=addCount%> successful subscriptions out of <%=totCount%> total import lines.
<%=errCount%> errors (not subscribed, listed above).
<%=dupCount%> duplicate records.
<%=emlCount%> invalid E-Mails.
<%=blkCount%> blocked domains.
|
<% else %>
 |
Import
Subscribers
|
Have
a list of just email address' you want to import that don't have
names, formats, or subscribed dates with them? Now you can import
this list of email address' with ease. Simply seperate your list
so that there is one (1) email address per line, choose the list
to import them to, and select the format you want them subscribed
as. Then hit the 'Import' button and this module will do the rest!
|
|
 |
|

|
<% end if %>