Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Clearing Array of mailRecipient names

3 posts in Objects Last posting was on 2003-04-11 20:54:09.0Z
Heidi Bischoff Posted on 2003-03-13 14:13:27.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Heidi Bischoff" <heidib@phila.acr.org>
Subject: Clearing Array of mailRecipient names
Date: Thu, 13 Mar 2003 09:13:27 -0500
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 206.137.103.99
Message-ID: <364_fTP021W6CHA.287@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7245
Article PK: 734540

Hello -
Currently I have a script which creates a mailMessage object. In a
For...Next loop, I populate things like .Subject and .NoteText, then in a
nested For...Next loop, I populate .Recipient[i].name.
Let's say that in my first nested loop, I may have 5 email addresses,
creating an array of 5 Recipient.names. However, in the next loop
iteration, I have only 2 recipients in the nested loop. What is happening
is that the first two .Recipient[i].names are being replaced with my 2 new
recipients, but the other 3 items in the array are still there so my second
e-mail (mailMessage object) is being sent to 5 people, but should really
only be sent To: the first 2 names (addresses).

All of the other properties of my mailMessage object are overwritten in each
iteration, except for this array of recipients. I think that, once my
e-mail has been sent I can loop back through my (5) recipients and set each
.name string to null before my next iteration. However, does anyone know of
a better way to set this array of recipients back to null at the end of each
loop?

Thanks in advance for any help.
- Heidi


Tyler Craft Posted on 2003-03-13 16:21:07.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Tyler Craft" <No_Spam_tyler.craft@gnb.ca>
Subject: Re: Clearing Array of mailRecipient names
Date: Thu, 13 Mar 2003 12:21:07 -0400
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 182.27.GNB.CA 142.139.182.27
Message-ID: <364_Qt$#o9X6CHA.181@forums.sybase.com>
References: <364_fTP021W6CHA.287@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7246
Article PK: 734538

Create an array empty string array and make Recipient[i].name equal to it
before the nested for loop.

Tyler

"Heidi Bischoff" <heidib@phila.acr.org> wrote in message
news:fTP021W6CHA.287@forums.sybase.com...
> Hello -
> Currently I have a script which creates a mailMessage object. In a
> For...Next loop, I populate things like .Subject and .NoteText, then in a
> nested For...Next loop, I populate .Recipient[i].name.
> Let's say that in my first nested loop, I may have 5 email addresses,
> creating an array of 5 Recipient.names. However, in the next loop
> iteration, I have only 2 recipients in the nested loop. What is happening
> is that the first two .Recipient[i].names are being replaced with my 2 new
> recipients, but the other 3 items in the array are still there so my
second
> e-mail (mailMessage object) is being sent to 5 people, but should really
> only be sent To: the first 2 names (addresses).
>
> All of the other properties of my mailMessage object are overwritten in
each
> iteration, except for this array of recipients. I think that, once my
> e-mail has been sent I can loop back through my (5) recipients and set
each
> .name string to null before my next iteration. However, does anyone know
of
> a better way to set this array of recipients back to null at the end of
each
> loop?
>
> Thanks in advance for any help.
> - Heidi
>
>
>


Tammy Posted on 2003-04-11 20:54:09.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Tammy
Date: Fri, 11 Apr 2003 16:54:09 -0400
Subject: Re: Clearing Array of mailRecipient names
Lines: 11
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_B8F443A4742A81BF0072D22E85256D05.005F4B0885256CE8@webforums>
References: <364_fTP021W6CHA.287@forums.sybase.com> <364_Qt$#o9X6CHA.181@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7323
Article PK: 734613

i tried doing this and it caused an error you have to declare the array of
time mailrecipient not string. This is the code that i have now and it
works correctly.

mailRecipient mr_array[]

mailsession mses
mailreturncode mret
mailmessage mmsg

mmsg.recipient[] = mr_array[]