Batch file 通过outlook发送电子邮件的DOS批处理:需要添加新行
这是我的一部分:Batch file 通过outlook发送电子邮件的DOS批处理:需要添加新行,batch-file,outlook,dos,line-breaks,batch-processing,Batch File,Outlook,Dos,Line Breaks,Batch Processing,这是我的一部分: start "" "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" /c ipm.note /m "email address&cc=email address 2;email address 3&subject=Very Important Alert&body=Line 1 of alert\nLine 2 of alert" 不过,这只是将文本\n插入到正文中。如何让它插
start "" "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" /c ipm.note /m "email address&cc=email address 2;email address 3&subject=Very Important Alert&body=Line 1 of alert\nLine 2 of alert"
不过,这只是将文本\n
插入到正文中。如何让它插入实际的换行符?试试以下方法:
"...&body=Line 1 of alert\r\nLine 2 of alert"
或者这个:
"...&body=Line 1 of alert%%0D%%0ALine 2 of alert"
以下是对我有用的;然而,我不得不点击发送按钮来完成这个过程
start "" "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" /c ipm.note /m "FromEmailAddress&cc=EmailAddress1;EmailAddress1&subject=Very Important Alert&body=Line 1 of alert%%0D%%0ALine 2 of alert"
这一个对我有用:
%%0D%%0A
<代码>\r\n仍在插入文字\r\n
序列。