如下是郵件中的內容格式html
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次構建日誌</title> </head> <body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" ffset="0"> <table width="95%" cellpadding="0" cellspacing="0" style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif"> <tr> <td>(本郵件是程序自動下發的,請勿回覆!)<br /><br /></td> </tr> <tr> <td><h2> <font color="#0000FF">構建結果 - ${BUILD_STATUS}</font> </h2></td> </tr> <tr> <td><h2><br /> <font color="#0000FF" style="font-size:20px">測試報告:<a href="http://192.168.1.189/examples/Jenkins_report/MojingCSP/test-output${build_number}/index.html">http://192.168.1.189/examples/Jenkins_report/MojingCSP/test-output${build_number}/index.html</a></font> </h2></td> </tr> <tr> <td><h2> <font color="#0000FF" style="font-size:15px">測試報告加載內容較多,請耐心等待</font> </h2></td> </tr> <tr> <td><br /> <b><font color="#0B610B">構建信息</font></b> <hr size="2" width="100%" align="center" /></td> </tr> <tr> <td> <ul> <li>項目名稱 : ${PROJECT_NAME}</li> <li>測試環境 : 192.168.1.187:8080</li> <li>構建編號 : 第${BUILD_NUMBER}次構建</li> <li>觸發緣由: ${CAUSE}</li> <li>構建日誌: <a href="${BUILD_URL}console">${BUILD_URL}console</a></li> </ul> </td> </tr> <tr> <td><b><font color="#0B610B">構建日誌 (最後 200行):</font></b> <hr size="2" width="100%" align="center" /></td> </tr> <!-- <tr> <td>Test Logs (if test has ran): <a href="${PROJECT_URL}ws/TestResult/archive_logs/Log-Build-${BUILD_NUMBER}.zip">${PROJECT_URL}/ws/TestResult/archive_logs/Log-Build-${BUILD_NUMBER}.zip</a> <br /> <br /> </td> </tr> --> <tr> <td><textarea cols="120" rows="30" readonly="readonly" style="font-family: Courier New">${BUILD_LOG, maxLines=200}</textarea> </td> </tr>