Automatic Mail from voucher

Discussion in 'Tally Developer' started by RSN, May 5, 2012.

    
  1. RSN

    RSN New Member


    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:Username:password: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:mad:@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:mad:@mdmailid:##SVMailServer:mad:@sendermailid:"astratally@rediffmail.com":"INVOICE":##SVMailAuthUserName:mad:@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
     


  2. Tushar

    Tushar New Member


    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..
     


  3. admin

    admin Administrator Staff Member


    Dinesh, Thanx a lot
     


  4. Azar Shaikh

    Azar Shaikh New Member


    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.
     


  5. tmdmuzammil

    tmdmuzammil New Member


    Hi.
    Is it possible to send the email subject of mail should be invoice No..
     


  6. Grace K

    Grace K New Member


    I have the exact same requirement. Did u happen to find any solution for the same?
     


Share This Page