1 回答

TA貢獻1856條經驗 獲得超11個贊
如果您的用戶名和密碼正確無誤,這些是從任何客戶端使Gmail正常工作的步驟。
# Visit https://accounts.google.com
#
# 1. Click on [Security] menu
# 2. Scroll to section [Less secure app access] and set it to ON
# 3. Scroll to section [Signing in to Google] and set [Use your phone to sign in] to OFF
# 4. Scroll to section [Signing in to Google] and set [2-step Verification] to OFF
現在,要發送一個簡單的文本/純電子郵件示例:
To: "Jane Doe" <[email protected]>
From: "John Doe" <[email protected]>
Subject: A text/plain email
MIME-Version: 1.0 (Created with SublimeText 3)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Good morning.
This is a message in text/plain format.
It contains text/plain.
It contains no base64 inline images or attachments.
Each line is no more than 76 characters in length.
Please reach out if you have any questions.
Thank you,
John Doe
SENIOR DEVELOPER
XYZ Solutions Inc.
P | 999.555.1234
然后,您可以使用 CURL 發送它:
# GMAIL TEST - text-plain.eml
curl --verbose -ssl smtps://smtp.gmail.com:465 --login-options AUTH=PLAIN --user [email protected]:passwword123 --mail-from [email protected] --mail-rcpt [email protected] --mail-rcpt-allowfails --upload-file text-plain.eml
- 1 回答
- 0 關注
- 272 瀏覽
添加回答
舉報