send mail via Outlook

Ask gaming related questions
User avatar
Tomer
Posts: 314
Joined: 21 Aug 2016, 05:11

send mail via Outlook

25 Sep 2016, 06:24

Hii,

I would like to send mail with ahk, I have this script which opens a new window message in outlook and then I just have to click "Send",
is it possible to send it automatically as well ?

Thanks!

Code: Select all

MailList := "[email protected]; [email protected]"

;edited out content

GoTo, EmailThem
Return

EmailThem:
Run, mailto:%MailList%?subject=Scheduled Database Maintenance&body=Greetings.`%0A`%0AWe are currently attempting to update or manage the MetroE 'Commercial Survey Tracker' database and noticed that you may still be logged in.`%0A`%0APlease save any updates or changes you have made and exit the database as soon as possible.  Maintenance should only last a few minutes once everyone is out.`%0A`%0AIf you have already logged out`, please disregard this automated system message.`%0A`%0A`%0A`%0AThank You.
Return
BuLLDoG
Posts: 10
Joined: 02 Jul 2015, 16:28

Re: send mail via Outlook

25 Sep 2016, 13:58

Yea, with ComObject :)
User avatar
Tomer
Posts: 314
Joined: 21 Aug 2016, 05:11

Re: send mail via Outlook

27 Sep 2016, 02:11

@BuLLDoG

tnx
BuLLDoG
Posts: 10
Joined: 02 Jul 2015, 16:28

Re: send mail via Outlook

27 Sep 2016, 15:05

Code: Select all

MailItem := ComObjCreate("Outlook.Application").CreateItem(0)
MailItem.Recipients.Add("[email protected]")
MailItem.attachments.add("c:\test.pdf")
MailItem.Subject := "Hello World"
MailItem.body := "Hello body text"
MailItem.display
BuLLDoG
Posts: 10
Joined: 02 Jul 2015, 16:28

Re: send mail via Outlook

27 Sep 2016, 15:07

MailItem.send
:)
BuLLDoG
Posts: 10
Joined: 02 Jul 2015, 16:28

Re: send mail via Outlook

27 Sep 2016, 15:19

It's only a sample with the options you may need.
User avatar
Tomer
Posts: 314
Joined: 21 Aug 2016, 05:11

Re: send mail via Outlook

04 Oct 2016, 12:41

Tnx!

Return to “Gaming”

Who is online

Users browsing this forum: WOlfen and 9 guests