Solved

Mail send not working

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
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…

708 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

16 Experts available now in Live!

Get 1:1 Help Now