RE: Sending to multiple recipients using MAPISendMail

new topic     » topic index » view thread      » older message » newer message

thinkways at YAHOO.COM wrote:
> 
> I don't support it in my mapi library (e-post.ew) 
> but I believe you need to specify 
> 
> 1. the addresses seperated by semicolons 
>  "me at here.com;him at there.org;"
> 
> 2. the # of receipients into RECIPCOUNT.
>  	poke4(message+SUBJECT,
> allocate_string(email_subject))
> 	poke4(message+TEXT, allocate_string(email_body))
> 	poke4(message+RECIPCOUNT, 1)
> 	poke4(message+RECIPIENTS, recipient)
> 
Thanks for the reply but I was going to post a reply to my own problem 
sometime today...now is as good a time as any.  The solution is that 
each recipient must have their OWN recipient structure.   You have to 
read MSDN library documentation a couple of times before you get that 
out of it (at least I do :) ).  So in order to do that, you have to 
allocate enough memory to hold all recipients and then format the memory 
accordingly.  It goes something like:

atom RECIP_SIZE
sequence recipient_list
RECIP_SIZE = 24
recipient_list = {{"Jonas Temple","myaddr at myserver.com"},
                  {"George Bush","president at whitehouse.gov"}}
recipient = allocate(length(recipient_list)*RECIP_SIZE)
mem_set(recipient, 0, length(recipient_list*RECIP_SIZE))
for i = 1 to length(recipient_list) do
    poke4(recipient+((i-1)*RECIP_SIZE)+RECIPCLASS, MAPI_TO)
    poke4(recipient+((i-1)*RECIP_SIZE)+NAME, recipient_list[i][1])
    poke4(recipient+((i-1)*RECIP_SIZE)+ADDRESS, recipient_list[i][2])
end for

That works and it makes sense how it was defined.

Thanks for the input!

Jonas

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu