error sending mail

  • Thread starter Thread starter Marco Alfano
  • Start date Start date
M

Marco Alfano

hi all,
I use this code to sending a message from Access trought Outlook:

.......
Set OggettoMail = OutApplication.CreateItem(olMailItem)

With OggettoMail

If IsNull(iA) = False And iA <> "" Then
Set Recipiente = .Recipients.Add(iA) 'iA is an input parameter
End If
If IsNull(iCc) = False And iCc <> "" Then
Set Recipiente = .Recipients.Add(iCc)
Recipiente.Type = olCC
End If
If IsNull(iCCn) = False And iCCn <> "" Then
Set Recipiente = .Recipients.Add(iCCn)
Recipiente.Type = olBCC
End If
If IsNull(iOggetto) = False And iOggetto <> "" Then
.Subject = iOggetto 'input parameter
End If
If IsNull(iTesto) = False And iTesto <> "" Then
.Body = iTesto 'input parameter
End If

I try to resolve the recipients with all of these 2 way:

1: For Each Recipiente In .Recipients
Recipiente.Resolve
Next

2: RisolviIndirizzi = .Recipients.ResolveAll 'RisolviIndirizzi is a
boolean parameter


The mail was created succesfull, so i try to send directly without display
it:

..send


But an error occur:

in italian: "Impossibile identificare uno o più nomi"

in english something like that: "impossible to identify the name"


I try to insert in the TO: field the real address email or the Name
displayed in outlook, but i have the same error message. The multiple
address is separate by the charater ";"
Anyone have an idea to resolve my problem? Any suggestion is really
appreciate.

I use: Access 2000 and Outlook 2000 (service pack 3)

bye bye
Marco Alfano

p.s. sorry for my english, i hope you understand me.
 
I have the same issue - if I find a resolution, I will
let you know right away - so far, I have had no luck -


-----Original Message-----
hi all,
I use this code to sending a message from Access trought Outlook:

.......
Set OggettoMail = OutApplication.CreateItem (olMailItem)

With OggettoMail

If IsNull(iA) = False And iA <> "" Then
Set Recipiente = .Recipients.Add(iA) 'iA is an input parameter
End If
If IsNull(iCc) = False And iCc <> "" Then
Set Recipiente = .Recipients.Add(iCc)
Recipiente.Type = olCC
End If
If IsNull(iCCn) = False And iCCn <> "" Then
Set Recipiente = .Recipients.Add(iCCn)
Recipiente.Type = olBCC
End If
If IsNull(iOggetto) = False And iOggetto <> "" Then
.Subject = iOggetto 'input parameter
End If
If IsNull(iTesto) = False And iTesto <> "" Then
.Body = iTesto 'input parameter
End If

I try to resolve the recipients with all of these 2 way:

1: For Each Recipiente In .Recipients
Recipiente.Resolve
Next

2: RisolviIndirizzi
= .Recipients.ResolveAll 'RisolviIndirizzi is a
 
ok thanx, the same for me: if i find a resolution i'll let you know.

bye
marco


"Debby" <[email protected]> ha scritto nel messaggio
I have the same issue - if I find a resolution, I will
let you know right away - so far, I have had no luck -


-----Original Message-----
hi all,
I use this code to sending a message from Access trought Outlook:

.......
Set OggettoMail = OutApplication.CreateItem (olMailItem)

With OggettoMail

If IsNull(iA) = False And iA <> "" Then
Set Recipiente = .Recipients.Add(iA) 'iA is an input parameter
End If
If IsNull(iCc) = False And iCc <> "" Then
Set Recipiente = .Recipients.Add(iCc)
Recipiente.Type = olCC
End If
If IsNull(iCCn) = False And iCCn <> "" Then
Set Recipiente = .Recipients.Add(iCCn)
Recipiente.Type = olBCC
End If
If IsNull(iOggetto) = False And iOggetto <> "" Then
.Subject = iOggetto 'input parameter
End If
If IsNull(iTesto) = False And iTesto <> "" Then
.Body = iTesto 'input parameter
End If

I try to resolve the recipients with all of these 2 way:

1: For Each Recipiente In .Recipients
Recipiente.Resolve
Next

2: RisolviIndirizzi
= .Recipients.ResolveAll 'RisolviIndirizzi is a
 
The only resolution i found at this moment is to create an email for each
contact.
The problem we are talking about seems to give an error ONLY when sending
mail with multiple address.... (separated with "," or ";" )

bye
marco



"Debby" <[email protected]> ha scritto nel messaggio
I have the same issue - if I find a resolution, I will
let you know right away - so far, I have had no luck -


-----Original Message-----
hi all,
I use this code to sending a message from Access trought Outlook:

.......
Set OggettoMail = OutApplication.CreateItem (olMailItem)

With OggettoMail

If IsNull(iA) = False And iA <> "" Then
Set Recipiente = .Recipients.Add(iA) 'iA is an input parameter
End If
If IsNull(iCc) = False And iCc <> "" Then
Set Recipiente = .Recipients.Add(iCc)
Recipiente.Type = olCC
End If
If IsNull(iCCn) = False And iCCn <> "" Then
Set Recipiente = .Recipients.Add(iCCn)
Recipiente.Type = olBCC
End If
If IsNull(iOggetto) = False And iOggetto <> "" Then
.Subject = iOggetto 'input parameter
End If
If IsNull(iTesto) = False And iTesto <> "" Then
.Body = iTesto 'input parameter
End If

I try to resolve the recipients with all of these 2 way:

1: For Each Recipiente In .Recipients
Recipiente.Resolve
Next

2: RisolviIndirizzi
= .Recipients.ResolveAll 'RisolviIndirizzi is a
 
Marco said:
ok thanx, the same for me: if i find a resolution i'll let you
know.

bye
marco

Guys, I found the solution! (Maybe you too, after one year...)
the .Add method requires SINGLE recipients to be passed one by one, you
cannot pass a string containing multiple addresses!

Maybe it would work too if you pass multiple addresses in a form like
"'(e-mail address removed)';[email protected]';'(e-mail address removed)'", with the "'"
characters including the addresses, but I didn't test it.

Bye,
Jumpjack
 

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

Back
Top