473,382 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Is it a safe assumption? - email addresses duplicates automatically deleted

I have a string of email addresses with duplicates. like

"ab*@abc.com; cd*@cde.com; ab*@abc.com"

If I use this string with sendobject, the receiver will get it only once
which is perfect to me. I wonder if it will be the case with other mail
applications than Outlook Express. TIA

(BTW if somebody has code to delete duplicates in a string like this, it
would be appreciated.)

Nov 12 '05 #1
2 2315
You should make sure that the level at which the duplication is ignored is
actually that of the sending application (OE) and not that of the outgoing
mail server (IMAP or SMTP?). It might be that OE *is* sending the duplicate
addresses on to the mailserver, which is then set to ignore them. In that
case (1) it wouldn't matter what email application was being used (2) it
might matter if your application were to be used on a different system,
routing mail through a different server.

HTH,
Bruce Rusl

"Saintor" <sa******@REMOVETHIShotmail.com> wrote in message
news:0p********************@weber.videotron.net...
I have a string of email addresses with duplicates. like

"ab*@abc.com; cd*@cde.com; ab*@abc.com"

If I use this string with sendobject, the receiver will get it only once
which is perfect to me. I wonder if it will be the case with other mail
applications than Outlook Express. TIA

(BTW if somebody has code to delete duplicates in a string like this, it
would be appreciated.)

Nov 12 '05 #2
On Sun, 21 Sep 2003 17:05:42 -0400 in comp.databases.ms-access,
"Saintor" <sa******@REMOVETHIShotmail.com> wrote:
I have a string of email addresses with duplicates. like

"ab*@abc.com; cd*@cde.com; ab*@abc.com"

If I use this string with sendobject, the receiver will get it only once
which is perfect to me. I wonder if it will be the case with other mail
applications than Outlook Express. TIA

(BTW if somebody has code to delete duplicates in a string like this, it
would be appreciated.)


Where did the string come from? If from a table then surely the
duplicates could be filtered out first?

If not then...
The StrTok function below came as an example from Basic MS-PDS 7.1, I
can't remember what the varDummy bit was for (I might have added that
later for some reason, serves me right for not commenting it). You can
use that in the following code that youi'll have to modify to suit
your needs.

Sub DelDupeAddy()
Dim strAddy As String
Dim strTemp As String
Dim strDeDupe As String

strAddy = "ab*@abc.com; cd*@cde.com; ab*@abc.com; x@x.com;
y@y.com; x@x.com"

' totally enclose each addy with ";" so we don't confuse
' a@a.com with aa@a.com later on
strDeDupe = ";"
strTemp = Trim(Strtok(strAddy, ";"))
Do While Len(strTemp)
If InStr(1, strDeDupe, ";" & strTemp & ";") = 0 Then
strDeDupe = strDeDupe & strTemp & ";"
End If
strTemp = Strtok("", ";")
Loop
' strip leading and trailing ; and put spaces back
strDeDupe = Replace(Mid(strDeDupe, 2, Len(strDeDupe) - 2), ";", ";
")
Debug.Print strDeDupe
End Sub


Function Strtok(pstrSrce As Variant, strDelim As String, Optional
varDummy As Variant) As Variant
Static intstart As Integer, strSaveStr As String

Dim intBegPos As Integer, intEndPos As Integer
Dim intLn As Integer

On Error GoTo StrTokError
' If first call, make a copy of the string.
If pstrSrce <> "" Then
intstart = 1: strSaveStr = pstrSrce
End If

intBegPos = intstart
intLn = Len(strSaveStr)
' Look for start of a token (character that isn't delimiter).
Do While intBegPos <= intLn And InStr(strDelim, Mid(strSaveStr,
intBegPos, 1)) <> 0
intBegPos = intBegPos + 1
Loop
' Test for token start found.
If intBegPos > intLn Then
Strtok = ""
Exit Function
End If
' Find the end of the token.
intEndPos = intBegPos
Do While intEndPos <= intLn And InStr(strDelim, Mid(strSaveStr,
intEndPos, 1)) = 0
intEndPos = intEndPos + 1
Loop
Strtok = Trim(Mid(strSaveStr, intBegPos, intEndPos - intBegPos))

If IsNull(pstrSrce) Then
Strtok = Null
End If

' Set starting point for search for next token.
intstart = intEndPos

StrTokExit:
Exit Function
StrTokError:
Resume StrTokExit

End Function

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #3

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

Similar topics

10
by: dave | last post by:
Hello, I'm creating a site that has several contact email addresses. These are vlid addresses, i'm wondering if i can use php to alter these addresses so that spam harvesters can't get them, yet a...
0
by: Valerie Smith | last post by:
Hi, I am looking for an email address management software package that can do the following: 1. Mail Merging / Demerging capabilities... a). I will be adding to my list of email addressses...
3
by: Alexander Anderson | last post by:
I have a DELETE statement that deletes duplicate data from a table. It takes a long time to execute, so I thought I'd seek advice here. The structure of the table is little funny. The following is...
117
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
6
by: Marlene | last post by:
Hi All I have the following scenario, where I have found all the duplicates in a table, based on an order number and a part number (item).I might have something like this: Order PODate Rec...
3
by: John Rivers | last post by:
Hello, I think this will apply to alot of web applications: users want the ability to delete a record in table x this record is related to records in other tables and those to others in...
1
by: Lyle Fairfield | last post by:
Option Explicit ' requires VBScript to be installed ' (maybe don't give this to your sugnificant other as ' it gets deleted addresses as well as current) ' obvious fixups needed '1. how get...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
45
by: Dennis | last post by:
Hi, I have a text file that contents a list of email addresses like this: "foo@yahoo.com" "tom@hotmail.com" "jerry@gmail.com" "tommy@apple.com" I like to
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.