Please help me in Auto Email Specific Report in One Scheduled Time Like 6 PM Daily

Discussion in 'Free Source Codes' started by ROHIT JAISWAR, Nov 12, 2021.

    
  1. ROHIT JAISWAR

    ROHIT JAISWAR Member


    I have Tried the Below but Not Worked for Me Please help me to Correct the Code
    Code:
    [System: Event]
    
    
        TSPL Smp Backup    Timer: TIMER    : Yes    : CALL    : MailToCEO
    
    [Function: MailToCEO]
       
        Variable    : SvMailTo         : String
        Variable     : LedgerName      : String
    
        000 : IF : $$String:$$MachineTime="18:00";$$MAchineTime = "11:50";""($CEOReportTiming1:Company:##SVCurrentCompany)  Or ($$MAchineTime =$CEOReportTiming2:Company:##SVCurrentCompany) Or ($$MAchineTime = $CEOReportTiming3:Company:##SVCurrentCompany)
        001    :    Msg Box:this is testing msg:"hi"
        l00 : Walk Collection : EMialCollections
       
        120    :    SET    : SVMailFormat            : IF $SESVMailFormat:Company:##SVCurrentCompany = "Excel (Spreadsheet)"             Then  $$SysName:Excel    Else +
                                              IF $SESVMailFormat:Company:##SVCurrentCompany = "HTML (web-publishing)"             Then  $$SysName:HTML     Else +
                                              IF $SESVMailFormat:Company:##SVCurrentCompany = "PDF (Portable Document Format)"     Then  $$SysName:PDF     Else ""
                                             
        130    :     SET    : SVExportFormat        : IF $SESVMailFormat:Company:##SVCurrentCompany = "Excel (Spreadsheet)"             Then  $$SysName:Excel     Else +
                                              IF $SESVMailFormat:Company:##SVCurrentCompany = "HTML (web-publishing)"             Then  $$SysName:HTML     Else +
                                              IF $SESVMailFormat:Company:##SVCurrentCompany = "PDF (Portable Document Format)"     Then  $$SysName:PDF     Else ""
    
        140 :     SET    : SVMailServerName        : $CMPMailServerName:Company:##SVCurrentCompany
        150    :     SET    : SVMailServer            : $SETSVMailServer:Company:##SVCurrentCompany
        160 :   SET    : SVMailUseSSL            : Yes
        170    :     SET    : SVMailUseSSLOnStdPort    : No
        180    :     SET    : SVMailFromName        : @@CmpMailName
        190    :     SET    : SVMailFromAddress        : $Email:Company:##SVCurrentCompany
        200    :     SET    : SVMailAuthUserName    : $SETSVMailUser:Company:##SVCurrentCompany
        210    :     SET    : SVMailAuthPasswd        : $SETSVMailPassWord:Company:##SVCurrentCompany
        220    :     SET    : SvMailTo                : $CEOReportingId ;If $$IsEmpty:$$CollectionField:$CEOReportingId:##Counter:EMialCollections Then "" Else $$CollectionField:$CEOReportingId:##Counter:EMialCollections
    ;    230    :     SET    : SVMailCC                : If $$IsEmpty:$$CollectionField:$CEOReportingId:(##Counter+1):EMialCollections Then "" Else $$CollectionField:$CEOReportingId:(##Counter+1):EMialCollections
        231    :     SET    : SVBrowserHeight         : IF $SESVMailFormat:Company:##SVCurrentCompany = "PDF (Portable Document Format)" Then 297 Else 0
        232    :    SET    : SVBrowserWidth        : IF $SESVMailFormat:Company:##SVCurrentCompany = "PDF (Portable Document Format)" Then 210 Else 0
    
        240    :     SET    : SVMailEmbedImage        : IF $SESVMailFormat:Company:##SVCurrentCompany = "HTML (web-publishing)"             Then Yes Else No
        250    :    SET    : SVMailAttachFileName    : IF $SESVMailFormat:Company:##SVCurrentCompany = "Excel (Spreadsheet)"             Then "Ledger Outstading.xls" Else +
                                              IF $SESVMailFormat:Company:##SVCurrentCompany = "HTML (web-publishing)"             Then "Ledger Outstading.HTM" Else +
                                              IF $SESVMailFormat:Company:##SVCurrentCompany = "PDF (Portable Document Format)"    Then "Ledger Outstading.PDF" Else ""
    
    
        260    :     SET    : SVPrintFileName        : $$MakeMailName:##SvMailTo:##SVMailServer:##SVMailFromName:##SVMailCC:"Daily Reporting":##SVMailAuthUserName:##SVMailAuthPasswd:##SVMailUseSSL:##SVMailUseSSLOnStdPort
    
        280    :    MAIL : CEO DashBoard    : True
       
    
        300 : End Walk
       
        310 : END IF
    
    [Collection : EMialCollections]
       
    Type :     CEOReportingsAggr    :Company
    Child of : ##SVCurrentCompany
     


Share This Page