Mail to a group

L

Leif Thorsen

I have in this disscussion forum got a tip of a method to make a group-mail
to a lot of mail-addresses taken from a question. When using this metod it
seems that there is a limitation of how many e-mailaddresses You can use at
the same time. When I have a question with 190 items I will have error number
2295 "Unknown recipients. The letter was´nt sent." When I reduce my items in
the question to below 100 there is no problems. Is there some sort of
limitation for how many e-mailaddresses I can use at the same time ????

Than You in advance for an answer

Leif Thorsen
 
D

Daniel Pineault

Leif,

Without any code to review we have no way of know which method you have
employed to send your e-mail and thus unable to troubleshoot with you.
Please post your e-mail routine so we can see what maybe be causing the issue.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
L

Leif Thorsen

Here is my code and my commentsBelow here You can see the VB-code I have
used. It works fine in when havin small amount of “Emailadress†in my
question.
I have translated from Swedish “Private Sub Kommandoknapp53_Click†to
“PrivateSub Button53_Click†for You to better understand and I hope I have
done it rigth. I hope You can see what I have done.

Private Sub Button53_Click()
On Error GoTo Err_Button53_Click

Dim db As DAO.Database
Dim rec As DAO.Recordset
Dim strSQL As String
Dim strEmailadress As String
Set db = CurrentDb()

strSQL = "SELECT QMYQuestion.Emailadress FROM QMyQuestion"

Set rec = db.OpenRecordset(strSQL, dbOpenDynaset)

Do Until rec.EOF

strEmailadress = rec!Emailadress & ";" & strEmailadress

rec.MoveNext
Loop

DoCmd.SendObject acSendNoObject, , , strEmailadress, , , , , , False

Exit_Button53_Click:
Exit Sub

Err_Button53_Click:
If Err.Number <> 2501 Then
MsgBox " Error " & Err.Number & ":" & Err.Description
End If
Resume Exit_Button53_Click
End Sub

I hope this will help You to understand what´s gone wrong

Have a nice weekend

Thank ou in advance
 
D

Danny J. Lesandrini

Leif:

sometimes error messages are correct and on point. could it be that the
190th email address was mistyped? That would produce the error "unknown
recipients".

I've never heard of a limit on email addresses and if there was, it would
probably be a binary number, like 256 or 128. Maybe it's a question of the
length of the total character string exceeding 8000 characters or something,
but more likely, the error message is correct and you have a bad address.

For that matter, it's probably not a good idea to send out a single email with
190 addresses. Why not loop through and send 1 email 190 times, once to
each recipient? That will make it more likely that the email won't be bounced
by anti-spam software and it will alert you to incorrect email addresses.
 
L

Leif Thorsen

Thank You for Your answer but I don´t think the problem is a mistyped address
because the error message comes long before Outlook has started to send the
e-mails. But - I think Your idea of looping the e-mails as You say but the
problemis that I am not familiar how to do. Can You give me a new hint ?? I
hope You can and therefore THANK YOU IN ADVANCE

Best regards

Leif
 
D

Danny J. Lesandrini

The exact process will depend on how you're getting the 190 addresses now.

I don't have the code here, but one app I have will parse a list of semicolon delimited
list of email addresses and process them one at a time.

Alternatively, and probably more likely, you have a table from which they reside. Then
it's a simple matter of looping through a recordset.


Dim db As Dao.Database, rs As Dao.Recordset
Dim sSQL As String, sEmail As String, sRecip As String
Dim sBody As String, sSubject As String

sSQL = "SELECT FName & ' ' & LName As Recip, Email FROM tblPersons"
Set db = CurrentDb
Set rs = db.OpenRecordset(sSQL, dbOpenSnapshot)

If Not rs.BOF and Not rs.EOF Then
Do Until rs.EOF
sEmail = Nz(rs!Email, "")
sRecip = Nz(rs!Recip, "")

sBody = "Hi " & sRecip & vbCrLf & vbCrLf & "Here's your email."
sSubject = "Email from The Database System"

' Send email here. You've got the email, a recipient name, body text and subject.
docmd.SendObject , , , to,cc,bcc,subject,messagetext, false


rs.MoveNext
Loop
End If

Set rs = Nothing
Set db = Nothing


The DoCmd.SendObject is something you can read more about in Help files.
 
L

Leif Thorsen

Thank You for Yur solution !

It works partly - probably because of me

Ther is 2 problems.

1.Following message is ncluded in each e-mail. I would like to take it away.
How to do???

Date: Mon, 2 Mar 2009 10:46:11 +0100
Message-ID: <BC1072D4B65B49ED8CD2B85AB00DCE39@HPDATOR>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579

2. The sending away of each mail needs to be confirmed in a messagebox
talking of the risk with virus etc. . How to loop through all of my
recipients without to confirm eaxh mail ???

Leif
 
F

Fred

Your described error message almost makes it sound like it cam from your
email software or provider? Possible you provider places a limit on the
number of emial addresses.


One other note.....if you have an email address that violates email syntax
(i.e. not just a bad address, but an address with spaces in it, or no "@"
etc.) it can make things immediately bomb.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top