Solved

Mail send not working

Posted on 2003-12-11
4
248 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn 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
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now