1. RE: Sending to multiple recipients using MAPISendMail

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 message » categorize

2. RE: Sending to multiple recipients using MAPISendMail

I must have gotten the semi-colon list thing from VB. 
This looks like a good solution. I may have to adopt
it for defining multiple file attachments. I'm
currently reworking e-post to use the Novell Groupwise
profile setting

 
> 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
> 
>
> 
>
> 
> 
> 


=====
ThinkWays! a  modular and distributed technical information environment from
Modular Reality systems.
http://www.geocities.com/SiliconValley/Lab/7577
Live: Useless Web Camera
http://www.geocities.com/SiliconValley/Lab/7577/camera.htm
Commuter Hell!
http://www.geocities.com/SiliconValley/Lab/7577/commute/commute.htm

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu