Connecting Tech Pros Worldwide Help | Site Map

Problems with MAPI32.DLL

Eugenio
Guest
 
Posts: n/a
#1: Nov 12 '05
I am doing an application that among the many activities it has to
carry on, it must also send through e-mail one or more than one PDF files.

I found out a similar example that do this function in the common site. In
this example there is not the sender, because it rightly consider the user
that
is using the program.

Unfortunately the application is used by a group of users and the mails they
send must have the same
sender (for instance: info@dominio.it that is a common mailbox for all
users)
without considering the personal e-mail address.

I set up the code as follows

....
....
....

ReDim MAPI_Recip(2) As MapiRecip

'SENDER

MAPI_Recip(0).Reserved = 0
MAPI_Recip(0).RecipClass = MAPI_ORIG '(=0)
MAPI_Recip(0).Name = "@info"
MAPI_Recip(0).Address = "info@dominio.it"
MAPI_Recip(0).EIDSize = 0
MAPI_Recip(0).EntryID = strNull

'RECEIVER

MAPI_Recip(1).Reserved = 0
MAPI_Recip(1).RecipClass = MAPI_TO '(=1)
MAPI_Recip(1).Name = "destinatario@altrodominio.it"
MAPI_Recip(1).Address = "destinatario@altrodominio.it"
MAPI_Recip(1).EIDSize = 0
MAPI_Recip(1).EntryID = strNull
....
....
....
MAPI_Message.Subject = sSubject
MAPI_Message.NoteText = sMessage
MAPI_Message.RecipCount = 2
SendMail = MAPISendMail(0, 0, MAPI_Message, MAPI_Recip,
MAPI_File,MAPI_LOGON_UI, 0)
....
....


Unfortunately the DLL comes back the error 15....
Is there someone that can help me to understand what I do wrong?

Thank you
Eugenio



ab1
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Problems with MAPI32.DLL


I have the very same problem.... and unfortunately no idea of the cause.
But I hope somebody replies who does know the answer.

Error 15 = "Bad Recipient", but I can't see what is causing it.

Alan


"Eugenio" <epiworld@tiscali.it> wrote in message
news:bpkm9h$kbq$1@lacerta.tiscalinet.it...[color=blue]
> I am doing an application that among the many activities it has to
> carry on, it must also send through e-mail one or more than one PDF files.
>
> I found out a similar example that do this function in the common site. In
> this example there is not the sender, because it rightly consider the user
> that
> is using the program.
>
> Unfortunately the application is used by a group of users and the mails[/color]
they[color=blue]
> send must have the same
> sender (for instance: info@dominio.it that is a common mailbox for all
> users)
> without considering the personal e-mail address.
>
> I set up the code as follows
>
> ...
> ...
> ...
>
> ReDim MAPI_Recip(2) As MapiRecip
>
> 'SENDER
>
> MAPI_Recip(0).Reserved = 0
> MAPI_Recip(0).RecipClass = MAPI_ORIG '(=0)
> MAPI_Recip(0).Name = "@info"
> MAPI_Recip(0).Address = "info@dominio.it"
> MAPI_Recip(0).EIDSize = 0
> MAPI_Recip(0).EntryID = strNull
>
> 'RECEIVER
>
> MAPI_Recip(1).Reserved = 0
> MAPI_Recip(1).RecipClass = MAPI_TO '(=1)
> MAPI_Recip(1).Name = "destinatario@altrodominio.it"
> MAPI_Recip(1).Address = "destinatario@altrodominio.it"
> MAPI_Recip(1).EIDSize = 0
> MAPI_Recip(1).EntryID = strNull
> ...
> ...
> ...
> MAPI_Message.Subject = sSubject
> MAPI_Message.NoteText = sMessage
> MAPI_Message.RecipCount = 2
> SendMail = MAPISendMail(0, 0, MAPI_Message, MAPI_Recip,
> MAPI_File,MAPI_LOGON_UI, 0)
> ...
> ...
>
>
> Unfortunately the DLL comes back the error 15....
> Is there someone that can help me to understand what I do wrong?
>
> Thank you
> Eugenio
>
>
>[/color]


Eugenio
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Problems with MAPI32.DLL


> I have the very same problem.... and unfortunately no idea of the cause.[color=blue]
> But I hope somebody replies who does know the answer.
>
> Error 15 = "Bad Recipient", but I can't see what is causing it.
>
> Alan
>[/color]


I'm sorry for my english, a friend wrote me the original message,
but I hope you'll understand me.

Last week I resolved my problem using CDO.DLL ver. 1.2.1 (Collaboration Data
Object) instead MAPI32.DLL .

You can found some example in MSDN site

http://msdn.microsoft.com/library/de...iew_of_cdo.asp

It's very easy!


Bye
Ciao

Eugenio


Closed Thread