nant mail issues

后端 未结 2 1661
灰色年华
灰色年华 2021-01-25 19:13

Can anyone please suggest me how we could configure the sending of mails through nant.I had even gone through the link but i was unsucessfull.

thanks and regards maddy

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-25 19:38

    Here is a sample build file. The solution is not very elegant but it works. All it does is logs a file and before sending email flush it and makes a copy of it to attach it in email.

    Note: there are some help links in code which i used while writing my own build file.

    Sample Build Scripts
    
    
    
    
    
    
       
    
    
    
    
        YOUR ACTUAL BUILD CODE GOES HERE
    
    
    
    
    
    
    
    
    
        
        -----------------------------------------------------------------------------------------------------------------
        TASK : INITIALIZE
        -----------------------------------------------------------------------------------------------------------------
        
    
             
        
                    
            
           
    
        
    
        
    
                
    
        
    
        
    
    
    
    
    
         
         ${emailsubject}   
    
    
      
    
         ${emailsubject}           
    
    
    
     
        
            BUILD FAILED .  CHANGE SUBJECT
        
                    
    
    
    
          
    
              
        BUILD FAILED . CHANGE SUBJECT       
        
        
    
           
    
    
    
    
    
              
        -----------------------------------------------------------------------------------------------------------------
        SENDING EMAIL
        -----------------------------------------------------------------------------------------------------------------
    
        
        
    
        ${emailsubject}    
        Sending Email
        Attaching File : ${build.log.dir}/email_${build.log.filename}
        Attaching File : ${path.vsshelper.log}/logs/email_${build.log.getlistoffiles}
    
        
        
        
        
           
    
                     
                
                                     
                    
                             
        
    
    
    

提交回复
热议问题