forked from camerb/AHKs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
67 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#include FcnLib.ahk | ||
#include SendEmailSimpleLib.ahk | ||
|
||
ExitApp | ||
|
||
|
@@ -170,3 +171,24 @@ WinLogActiveStats(function, lineNumber) | |
%A_LoopField% := A_LoopField . ": " . %A_LoopField% | ||
delog("Debugging window info", function, lineNumber, winTitle, width, height, xPosition, yPosition, winText) | ||
} | ||
|
||
;Send an email without doing any of the complex queuing stuff | ||
SendEmailNow(sSubject, sBody, sAttach="", sTo="[email protected]", sReplyTo="[email protected]") | ||
{ | ||
;sUsername, sPassword, | ||
|
||
;item .= SexPanther() | ||
|
||
sFrom := username . "@gmail.com" | ||
|
||
sServer := "smtp.gmail.com" ; specify your SMTP server | ||
nPort := 465 ; 25 | ||
bTLS := True ; False | ||
nSend := 2 ; cdoSendUsingPort | ||
nAuth := 1 ; cdoBasic | ||
sUsername := "cameronbaustianmitsibot" | ||
sPassword := "niftyemailpassword" | ||
|
||
SendTheFrigginEmail(sSubject, sAttach, sTo, sReplyTo, sBody, sUsername, sPassword, sFrom, sServer, nPort, bTLS, nSend, nAuth) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#include FcnLib.ahk | ||
#include thirdParty\COM.ahk | ||
#include SendEmailSimpleLib.ahk | ||
|
||
;Send an email without doing any of the complex queuing stuff | ||
SendEmailSimple(sSubject, sBody, sAttach="", sTo="[email protected]", sReplyTo="[email protected]") | ||
|
@@ -18,36 +19,3 @@ SendEmailSimple(sSubject, sBody, sAttach="", sTo="[email protected]", sR | |
|
||
SendTheFrigginEmail(sSubject, sAttach, sTo, sReplyTo, sBody, sUsername, sPassword, sFrom, sServer, nPort, bTLS, nSend, nAuth) | ||
} | ||
|
||
SendTheFrigginEmail(sSubject, sAttach, sTo, sReplyTo, sBody, sUsername, sPassword, sFrom, sServer, nPort=25, bTLS=true, nSend=2, nAuth=1) | ||
{ | ||
;TODO catch error sending email | ||
COM_Init() | ||
pmsg := COM_CreateObject("CDO.Message") | ||
pcfg := COM_Invoke(pmsg, "Configuration") | ||
pfld := COM_Invoke(pcfg, "Fields") | ||
|
||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/sendusing", nSend) | ||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 60) | ||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/smtpserver", sServer) | ||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/smtpserverport", nPort) | ||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/smtpusessl", bTLS) | ||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", nAuth) | ||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/sendusername", sUsername) | ||
COM_Invoke(pfld, "Item", "http://schemas.microsoft.com/cdo/configuration/sendpassword", sPassword) | ||
COM_Invoke(pfld, "Update") | ||
|
||
COM_Invoke(pmsg, "From", sFrom) | ||
COM_Invoke(pmsg, "To", sTo) | ||
COM_Invoke(pmsg, "ReplyTo", sReplyTo) | ||
COM_Invoke(pmsg, "Subject", sSubject) | ||
COM_Invoke(pmsg, "TextBody", sBody) | ||
Loop, Parse, sAttach, |, %A_Space%%A_Tab% | ||
COM_Invoke(pmsg, "AddAttachment", A_LoopField) | ||
COM_Invoke(pmsg, "Send") | ||
|
||
COM_Release(pfld) | ||
COM_Release(pcfg) | ||
COM_Release(pmsg) | ||
COM_Term() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,8 @@ | ||
#include FcnLib.ahk | ||
#include thirdParty\COM.ahk | ||
|
||
;Send an email without doing any of the complex queuing stuff | ||
SendEmailSimple(sSubject, sBody, sAttach="", sTo="[email protected]", sReplyTo="[email protected]") | ||
{ | ||
;sUsername, sPassword, | ||
|
||
;item .= SexPanther() | ||
|
||
sFrom := username . "@gmail.com" | ||
|
||
sServer := "smtp.gmail.com" ; specify your SMTP server | ||
nPort := 465 ; 25 | ||
bTLS := True ; False | ||
nSend := 2 ; cdoSendUsingPort | ||
nAuth := 1 ; cdoBasic | ||
sUsername := "cameronbaustianmitsibot" | ||
sPassword := "niftyemailpassword" | ||
|
||
SendTheFrigginEmail(sSubject, sAttach, sTo, sReplyTo, sBody, sUsername, sPassword, sFrom, sServer, nPort, bTLS, nSend, nAuth) | ||
} | ||
|
||
SendTheFrigginEmail(sSubject, sAttach, sTo, sReplyTo, sBody, sUsername, sPassword, sFrom, sServer, nPort=25, bTLS=true, nSend=2, nAuth=1) | ||
{ | ||
;TODO catch error sending email | ||
COM_Init() | ||
pmsg := COM_CreateObject("CDO.Message") | ||
pcfg := COM_Invoke(pmsg, "Configuration") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.