This is simple mail library for MT4.
This sends mail by CDO with VBScript.
-
Copy MQL4/Include/mail.vbs and MQL4/Include/Mailer.mqh to
<TERMINAL_DATA_PATH>/MQL4/Include
- TERMINAL_DATA_PATH can be opened from MetaEditor
- To open the directory, "Open Folder" on "MQL4" root node in Navigator
-
Change the hard-coded configuration in MQL4/Include/mail.vbs
- See the comments in the file to see where you should change
-
Use
sendMail(subject, body)
function same asSendMail(subject, body)
- See a sample script in MQL4/Scripts/SendMailTest.mq4
-
MQL4/Include/mail.vbs と MQL4/Include/Mailer.mqh を
<TERMINAL_DATA_PATH>/MQL4/Include
にコピーしてください- TERMINAL_DATA_PATH は MetaEditor から開くことができます。
- MetaEditor の Navigator ビューから、 ツリー親の MQL4 ディレクトリを右クリックし、 "Open Folder" をクリックしてください。
-
MQL4/Include/mail.vbs にハードコーディングされた設定を変更してください
- 変更箇所は、VBSファイルのコメントを参照してください。
-
sendMail(subject, body)
関数をSendMail(subject, body)
と同じように使ってください- サンプルスクリプトの MQL4/Scripts/SendMailTest.mq4 を参照してください。