Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

MailGroup

MailGroup(cMailAndGroup) -> cMailAndGroup

Expands groups from the current user address book.

MailGroupAdvPL
01 · OVERVIEW

Overview

The TOTVS Protheus 10/11 reference describes semicolon-separated group names and email addresses. The result combines supplied addresses with members of that user’s groups. This function is not documented as sending a message. The listed source is MSSPOOL.PRW. As historical documentation, availability and group resolution require checking in the deployed release. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

MailGroup(cMailAndGroup) -> cMailAndGroup

Parameters

cMailAndGroup
CharacterRequired

Semicolon-separated groups and addresses.

Return value

String of semicolon-separated addresses.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed515()
    // Prepared block requires a test user/address book; not invoked.
    Local bExpand := {|cInput| MailGroup(cInput)}
    ConOut(ValType(bExpand))
Return Nil
Expected result

Prints B. When evaluated, the block returns addresses according to the current address book. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Test existing and missing groups without logging recipients. Check authorization and final recipients before sending through another API.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. MailGroup. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha