Solved

Mail send not working

Posted on 2003-12-11
4
250 Views
Last Modified: 2013-12-18
Hi Guys

The following Send Mail is only sending to the MailTo, the Mail CC does not seem to be working

REM "Send Mail";
MailTo:=NameFull;
MailCc:=@If(Status_Flag="4";profile_WhoToNotify:@If(WhoelsetoNotify1 != "";WhoelsetoNotify1;""):SiteManager;"");
MailSubject:=ApproverMailSubject_2+"# "+@Trim(DocNum);

MailRemark:=ApproverMailRemark_2 +@NewLine+@NewLine+"Leave Type: "+type+@NewLine+@NewLine+"Start Date: "+@Text(StartDate)+@NewLine+@NewLine+"End Date: "+@Text(EndDate)+@NewLine+@NewLine+"Best Regards";"";

notify := " A notification will be sent to " + @Name([CN];MailTo) + " ." ;
@Do(@SetField("Status_Flag";"4");@SetField("ApprovalStatus";"Approved");@Environment("UnLock";"No");@SetField("Approve_Date";@Now));
@Do(@Prompt([OK];"Send a Notification";notify);@MailSend(MailTo;MailCc;"";MailSubject;MailRemark;"";[IncludeDoclink]));
@Command([FileSave]);
@Do(@SetField("SaveOptions"; "0");@PostedCommand([FileCloseWindow]))
0
Comment
Question by:adspmo
  • 2
4 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9920599
Make sure that MailCC is not null.. if it is null you cannot expect it to cc somebody !

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9920606
Prompt out the values of mailto and mailcc before mailsend .. that will give you whole picture
0
 
LVL 15

Assisted Solution

by:Bozzie4
Bozzie4 earned 150 total points
ID: 9920631
To do that, change the line
MailCc:=@If(Status_Flag="4";profile_WhoToNotify:@If(WhoelsetoNotify1 != "";WhoelsetoNotify1;""):SiteManager;"");

to

MailCc:=@If(Status_Flag="4";@trim(@unique(profile_WhoToNotify:@If(WhoelsetoNotify1 != "";WhoelsetoNotify1;""):SiteManager));"");

You probably have empty entries in the list of CC names, and that would probably cause the action to fail.

cheers,

Tom
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 200 total points
ID: 9920822
I would also smplify the CC calculation:

MailCc:=@Trim(   @If(Status_Flag="4";profile_WhoToNotify:WhoelsetoNotify1:SiteManager;"")   );

And, to check what it is doing:

@Prompt([OK]; "CC info";
@If(!Status_Flag="4"; "No CC"; WhoelsetoNotify1 = ""; "Have CC, NO extra notifications, only" + @Implode(profile_WhoToNotify:SiteManager;","); "Have CC, with extra notification to: " + @Implode(WhoelsetoNotify1;",") + " along with the usual suspects, " + @Implode(profile_WhoToNotify:SiteManager;",")
);
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question