Solved

Mail send not working

Posted on 2003-12-11
4
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

710 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