gpt4 book ai didi

javascript - 如何借助 Ant Mail Task 在 HTML Body 部分中以纯文本形式发送邮件

转载 作者:行者123 更新时间:2023-12-02 19:41:32 25 4
gpt4 key购买 nike

我正在使用 Ant 邮件任务发送一封有关构建状态的电子邮件。

<target name="htmllink">
<exec executable="svn" outputproperty="**svnlog**">
<arg line="log -r ${bottom_rev}:${top_rev} -v svn://172.16.143.200/Repository/branches/${project.svn.url}/${build_tech} --username ${svn.username} --password ${svn.username}" />
</exec>
<mail from="AutoDeploy@amphorainc.com"
messagemimetype="text/html"
tolist="pkumar@amphorainc.com"
cclist="pkumar@amphorainc.com"
bcclist="pkumar@amphorainc.com"
subject="BUILD SCRIPT AUTOMATED MAIL FOR ${patch.name}"
mailhost="172.16.143.41"
charset="ISO-8859-1"> <!-- local SMTP mailhost IP -->
<message src="OC.html" />
</mail>
</target>`
here i am using OC.html message source page for mailing contents like below
`<html>
<head>
<STYLE TYPE="text/css">
td{font-family: Calibri; font-size: 12pt;}
.color {color:black;font-size:10pt;display : block;line-height:16px; text-align : center;background-color:#D4AEBB; border:outset 3px #DB7093;text-decoration:none;width:50%;}
.color:HOVER {color:red;font-size:10pt;display : block; line-height:16px;text-align : center;background-color : #F0DEE5; border :inset 3px #CC3366;text-decoration:none;width:50%;}
</STYLE>
</head>
<body onload="wrapLines(30, ${svnlog})">
<a class="color" href="http://172.16.170.113/dashboard/Patch_details.aspx?patch_name=${patch.name}&branch_name=${project.svn.url}" rel="Does not exist">BDT Report</a></br>
BR#${BR.number}</br>
The build is completed and available at FTP site.</br>
</br>
Objective-C patch</br>
*******************************************************************************</br>
Patch Name : ${patch.name}</br>
Revision Number : ${bottom_rev} to ${top_rev}</br>
FTP Location : ${ftp.location}/${patch.name}.tar.gz</br>
*******************************************************************************</br>
SVN Log Info</br>
************</br>
**${svnlog}**</br></br>
</body>
</html>

在正文部分,我打印了 ant 变量 ${svnlog},它是一堆代码行 checkin 描述。因此,这里将所有行打印在一长行中,而不是单独的行中。

我怎样才能在单独的行中得到它?

最佳答案

<body onload="wrapLines(30, ${svnlog})">
<pre>
<a class="color" href="http://172.16.170.113/dashboard/Patch_details.aspx?patch_name=${patch.name}&branch_name=${project.svn.url}" rel="Does not exist">BDT Report</a></br>
BR#${BR.number}</br>
The build is completed and available at FTP site.</br>
</br>
Objective-C patch</br>
*******************************************************************************</br>
Patch Name : ${patch.name}</br>
Revision Number : ${bottom_rev} to ${top_rev}</br>
FTP Location : ${ftp.location}/${patch.name}.tar.gz</br>
*******************************************************************************</br>
SVN Log Info</br>
************</br>
**${svnlog}**</br></br>
</body>
</pre>

关于javascript - 如何借助 Ant Mail Task 在 HTML Body 部分中以纯文本形式发送邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10331582/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com