0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

メール自動生成

Last updated at Posted at 2024-08-28
@echo off
setlocal enabledelayedexpansion

rem メールの設定
set to=to@example.com
set cc=cc1@example.com,cc2@example.com
set bcc=bcc@example.com

rem 日付の取得とURLエンコード
for /f "tokens=2 delims==" %%i in ('wmic OS Get localdatetime /value ^| find "="') do set datetime=%%i
set year=!datetime:~0,4!
set month=!datetime:~4,2!
set day=!datetime:~6,2!
set subject=自動生成メール(!year!-!month!-!day!)
set body=これは自動生成されたメールの本文です。%0D%0A次の行のテキストです。%0D%0Aさらに次の行のテキストです。

rem メールを開く
start "" "mailto:%to%?cc=%cc%&bcc=%bcc%&subject=!subject!&body=!body!"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?