Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 通过outlook发送电子邮件的DOS批处理:需要添加新行_Batch File_Outlook_Dos_Line Breaks_Batch Processing - Fatal编程技术网

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
序列。