Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Mail send not working

Posted on 2003-12-11
4
Medium Priority
?
255 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 600 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 800 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month7 days, 17 hours left to enroll

824 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