I have created a TDL to Send Mail Automatically at the time of creating Voucher , but only empty invoice i recived . I am attaching my code for yr reference. Help me to resolve this issue. [#Form : Sales Color] On : Form Accept : Call : Mail Invoice On : Form Accept : Yes : Form Accept ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [System : formula] Sendermailid: $Email:Company:##svcurrentcompany Mdmailid : $Email:Ledger:$Partyledgername Mypw : ##SVMailAuthPasswd ;; Action : SET : Variable : Functionname:ToAddress:SMTP Sever name:From Address:CC Address:Subject:Usernameassword:Use SSL ;; Note Username and password is required only if Use SSL is set to True else "" [Function: Mail Invoice] VARIABLE : SVMAILSTRING : String 01 : IF : $$ISEMPTY@MDMAILID 01 A : LOG : "Customer Does not Have and E.Mail.Id" 01 B : RETURN 01 C : END IF 02 : SET FILE LOG ON ;01 : LOG : "Process started at " + $$SysInfo:SystemTimeHMS 05 : SET : SVFromDate : $$MonthStart:##SVCurrentDate 10 : SET : SVToDate : $$MonthEnd:##SVCurrentDate 40 : Set : SVMailEmbedImage : @@AsAttach 50 : Set : SVPRINTFILENAME : $$MakeMailName@mdmailid:##SVMailServer@sendermailid:"astratally@rediffmail.com":"INVOICE":##SVMailAuthUserName@mypw:TRUE:FALSE 60 : MAIL : PRINTED INVOICE: YES 215 : LOG : "Mail sent to:"+$Name+@@Mdmailid 220 : MSGBOX : "Success !!!" : " E.Mails has been sent" : YES ;230 : LOG : "Process completed at " + $$SysInfo:SystemTimeHMS 240 : SET FILE LOG ON [#Variable: SVMailAuthPasswd] Type : String Persistent : Yes [#Variable: SVMailFromAddress] Type : String Persistent : Yes
1.I din find any collection for u r particular voucher for any action their should be a WALK COLLECTION with END WALK 2. GO TO SAMPLE TDL YOU WILL GET SOLUTION! THANK YOU..
Dinesh Sir, Nice Reply. But $CmpVchID:Company:##SVCurrentCompany Returns Assignning MasterID for Voucher. & If In Multi-user Enviorment . Other User Entering Sales Invoice in Same Time then it will mail Second User Invoice format for Both Users if Second User Saves his invoice Before First User.