您将粘贴包含多行的文本。如果将此文本粘贴到 shell 中,则可能会导致命令意外执行。是否继续?
1、您将粘贴包含多行的文本。如果将此文本粘贴到 shell 中,则可能会导致命令意外执行。是否继续?。如图1
2、点击 仍然粘贴,然后报错:curl : 无效的 URI: 未能分析主机名。如图2
PS C:\Users\Lenovo> curl \
curl : 无效的 URI: 未能分析主机名。
所在位置 行:1 字符: 1
+ ~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], UriFormatException
+ FullyQualifiedErrorId : System.UriFormatException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS C:\Users\Lenovo> --ssl-reqd \
所在位置 行:1 字符: 3
+ --ssl-reqd \
+ ~
一元运算符“--”后面缺少表达式。
所在位置 行:1 字符: 3
+ --ssl-reqd \
表达式或语句中包含意外的标记“ssl-reqd”。
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
3、放弃在 Windows 终端中粘贴,而是在 Ubuntu 终端中粘贴。粘贴后回车,执行成功。如图3
wangqiang@DESKTOP-QLPK8QM:~$ curl \
> --ssl-reqd \
> --url 'smtp://live.smtp.mailtrap.io:587' \
> --user 'api:3511fb6ffc4b70c44293a9168780a851' \
> --mail-from mailtrap@mail.wangqiang.store \
> --mail-rcpt shuijingwanwq@gmail.com \
upload-f> --upload-file - <<EOF
> From: Magic Elves <mailtrap@mail.wangqiang.store>
> To: Mailtrap Inbox <shuijingwanwq@gmail.com>
> Subject: You are awesome!
> Content-Type: multipart/alternative; boundary="boundary-string"
>
> --boundary-string
> Content-Type: text/plain; charset="utf-8"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
> Congrats for sending test email with Mailtrap!
>
> If you are viewing this email in your inbox – the integration works.
> Now send your email using our SMTP server and integration of your choice!
>
> Good luck! Hope it works.
>
> --boundary-string
> Content-Type: text/html; charset="utf-8"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
> <!doctype html>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> </head>
> <body style="font-family: sans-serif;">
> <div style="display: block; margin: auto; max-width: 600px;" class="main">
> <h1 style="font-size: 18px; font-weight: bold; margin-top: 20px">Congrats for sending test email with Mailtrap!</h1>
> <p>If you are viewing this email in your inbox – the integration works.</p>
<img alt="> <img alt="Inspect with Tabs" src="https://assets-examples.mailtrap.io/integration-examples/welcome.png" style="width: 100%;">
> <p>Now send your email using our SMTP server and integration of your choice!</p>
> <p>Good luck! Hope it works.</p>
> </div>
> <!-- Example of invalid for email html/css, will be detected by Mailtrap: -->
> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%3E%0A%3E%20%20%20%20%20%20%20.main%20%7B%20background-color%3A%20white%3B%20%7D%0A%3E%20%20%20%20%20%20%20a%3Ahover%20%7B%20border-left-width%3A%201em%3B%20min-height%3A%202em%3B%20%7D%0A%3E%20%20%20%20%20%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />
> </body>
> </html>
>
> --boundary-string--
> EOF
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1629 0 0 0 1629 0 382 --:--:-- 0:00:04 --:--:-- 382
curl: (56) Failure when receiving data from the peer
wangqiang@DESKTOP-QLPK8QM:~$



近期评论