Jump to content

Search the Community

Showing results for tags 'pop3'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 6 results

  1. This is modest beginning for UDF Chilkat component: https://www.chilkatsoft.com/downloads_ActiveX.asp Some of AcitveX object bundled into this component (dll file) are Free (you can verify it here), some other are commercial. You can downolad this UDF here: ; #INDEX# ======================================================================== ; Title .........: Chilkat.au3 ; AutoIt Version : 3.3.10.2++ ; Language ......: English ; Description ...: A collection of Function for use with Chilkat component ; Author ........: mLipok ; Modified ......: ; URL ...........: https://www.chilkatsoft.com/refdoc/activex.asp ; URL ...........: https://www.chilkatsoft.com/downloads_ActiveX.asp ; Date ..........: 2017/02/01 ; Version .......: 0.1.1 BETA - Work in progress ; ================================================================================ #cs 2017/02/01 . First official version - mLipok #ce http://www.chilkatforum.com/questions/1306/is-the-chilkat-upload-component-freeware Examples: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 ;~ #AutoIt3Wrapper_Run_Debug_Mode=Y #Tidy_Parameters=/sort_funcs /reel #include <Array.au3> #include <StringConstants.au3> #include "Chilkat.au3" _Example() Func _Example() _ErrorLog_ChilkatWrapper(ConsoleWrite) _Chilkat_StartUp(@ScriptDir & '\ChilkatAx-9.5.0-win32.dll') _Chilkat_DllVersion($CHILKATOBJ_VERSION_950) Local $oGLOBAL = _Chilkat_GLOBAL_ObjCreate() If @error Then MsgBox($MB_ICONERROR, 'GLOBAL Declartion', '@error = ' & @error & @CRLF & '@extended = ' & @extended) _Chilkat_GLOBAL_UnlockBundle($oGLOBAL, "Anything for 30-day trial") If @error Then MsgBox($MB_ICONERROR, 'UnlockBundle', '@error = ' & @error & @CRLF & '@extended = ' & @extended) ; Just comment / uncomment one of this followin Examples functions: ;~ _Example_12_JsonObject_PrettyPrint() ;~ _Example_13_JsonObject_IterateMembers() ;~ _Example_14_JsonObject_CreateDocument() ;~ _Example_15_CSV_ColumnNames() ;~ _Example_16_CSV_ToArray() _Example_17_CSV_ToArray('(?i).*?Pierwszy.*?Urz.*?Skarb.*?', '(?i).*Katowice.*?') EndFunc ;==>_Example Func _Example_12_JsonObject_PrettyPrint() _Log_ChilkatExample('_Example_12_JsonObject_PrettyPrint') ; https://www.example-code.com/vbscript/json_pretty_print.asp Local $oJSON = _Chilkat_JSON_ObjCreate() If @error Then Return SetError(@error, @extended, $CHILKAT_RET_FAILURE) Local $sJSON_String = "{""name"": ""donut"",""image"":{""fname"": ""donut.jpg"",""w"": 200,""h"": 200},""thumbnail"":{""fname"": ""donutThumb.jpg"",""w"": 32,""h"": 32}}" Local $iSuccess = $oJSON.Load($sJSON_String) If ($iSuccess <> 1) Then ConsoleWrite($oJSON.LastErrorText & @CRLF) Return SetError(@error, @extended, $CHILKAT_RET_FAILURE) EndIf ; To pretty-print, set the EmitCompact property equal to 0 $oJSON.EmitCompact = 0 ; If bare-LF line endings are desired, turn off EmitCrLf ; Otherwise CRLF line endings are emitted. $oJSON.EmitCrLf = 0 ; Emit the formatted JSON: ConsoleWrite($oJSON.Emit() & @CRLF) EndFunc ;==>_Example_12_JsonObject_PrettyPrint Func _Example_13_JsonObject_IterateMembers() _Log_ChilkatExample('_Example_13_JsonObject_IterateMembers') ; https://www.example-code.com/vbscript/json_iterate_members.asp Local $oJSON = _Chilkat_JSON_ObjCreate() If @error Then Return SetError(@error, @extended, $CHILKAT_RET_FAILURE) Local $sJSON_String = "{ ""id"": 1, ""name"": ""A green door"", ""tags"": [""home"", ""green""], ""price"": 125 }" Local $iSuccess = $oJSON.Load($sJSON_String) If ($iSuccess <> 1) Then ConsoleWrite($oJSON.LastErrorText & @CRLF) Return SetError($CHILKAT_ERR_LOAD, @extended, $CHILKAT_RET_FAILURE) EndIf Local $sName = '', $sValue = '' Local $iNumMembers = $oJSON.Size, $iValue = 0 For $iMember_idx = 0 To $iNumMembers - 1 $sName = $oJSON.NameAt($iMember_idx) $sValue = $oJSON.StringAt($iMember_idx) ConsoleWrite($sName & ": " & $sValue & @CRLF) $iValue = $oJSON.IntAt($iMember_idx) ConsoleWrite($sName & " as integer: " & $iValue & @CRLF) Next EndFunc ;==>_Example_13_JsonObject_IterateMembers Func _Example_14_JsonObject_CreateDocument() _Log_ChilkatExample('_Example_14_JsonObject_CreateDocument') ; https://www.example-code.com/vbscript/create_json.asp Local $oJSON = _Chilkat_JSON_ObjCreate() If @error Then Return SetError(@error, @extended, $CHILKAT_RET_FAILURE) Local $iSuccess $iSuccess = $oJSON.AddStringAt(-1, "Title", "Pan's Labyrinth") ConsoleWrite("- $iSuccess=" & $iSuccess & @CRLF) $iSuccess = $oJSON.AddStringAt(-1, "Director", "Guillermo del Toro") ConsoleWrite("- $iSuccess=" & $iSuccess & @CRLF) $iSuccess = $oJSON.AddStringAt(-1, "Original_Title", "El laberinto del fauno") ConsoleWrite("- $iSuccess=" & $iSuccess & @CRLF) $iSuccess = $oJSON.AddIntAt(-1, "Year_Released", 2006) ConsoleWrite("- $iSuccess=" & $iSuccess & @CRLF) $oJSON.EmitCompact = 0 ConsoleWrite($oJSON.Emit() & @CRLF) EndFunc ;==>_Example_14_JsonObject_CreateDocument Func _Example_15_CSV_ColumnNames() _Log_ChilkatExample('_Example_15_CSV_ColumnNames') ; https://www.example-code.com/vbscript/csv_columnNames.asp Local $sURL = 'http://www.chilkatsoft.com/testData/sample.csv' InetGet($sURL, @ScriptDir & '\sample.csv') Local $oCSV = _Chilkat_CSV_ObjCreate() If @error Then Return SetError(@error, @extended, $CHILKAT_RET_FAILURE) ; Prior to loading the CSV file, indicate that the 1st row ; should be treated as column names: $oCSV.HasColumnNames = 1 ; Load the $oCSV records from the file: Local $iSuccess = $oCSV.LoadFile(@ScriptDir & "\sample.csv") If ($iSuccess <> 1) Then ConsoleWrite($oCSV.LastErrorText & @CRLF) Return SetError($CHILKAT_ERR_LOADFILE, @extended, $CHILKAT_RET_FAILURE) EndIf Local $iIndex = 0 Local $sColName = '' ; Display the column names: For $iCol_idx = 0 To $oCSV.NumColumns - 1 $sColName = $oCSV.GetColumnName($iCol_idx) ConsoleWrite($iCol_idx & ": " & $sColName & @CRLF) ; The following line demonstrates to to get the column ; index given a column name: $iIndex = $oCSV.GetIndex($sColName) ConsoleWrite($sColName & " is at column index " & $iIndex & @CRLF) Next EndFunc ;==>_Example_15_CSV_ColumnNames Func _Example_16_CSV_ToArray() _Log_ChilkatExample('_Example_16_CSV_ToArray') Local $sURL = 'http://www.chilkatsoft.com/testData/sample.csv' InetGet($sURL, @ScriptDir & '\sample.csv') Local $oCSV = _Chilkat_CSV_ObjCreate() If @error Then Return SetError(@error, @extended, $CHILKAT_RET_FAILURE) ; Prior to loading the CSV file, indicate that the 1st row ; should be treated as column names: $oCSV.HasColumnNames = 1 ; Load the $oCSV records from the file: Local $iSuccess = $oCSV.LoadFile(@ScriptDir & "\sample.csv") If ($iSuccess <> 1) Then ConsoleWrite($oCSV.LastErrorText & @CRLF) Return SetError($CHILKAT_ERR_LOADFILE, @extended, $CHILKAT_RET_FAILURE) EndIf Local $iNumColumns = $oCSV.NumColumns Local $iNumRows = $oCSV.NumRows Local $aResult[$iNumRows + 1][$iNumColumns] ; First get the column names For $iCol_idx = 0 To $iNumColumns - 1 $aResult[0][$iCol_idx] = $oCSV.GetColumnName($iCol_idx) Next For $iRow_idx = 0 To $iNumRows - 1 For $iCol_idx = 0 To $iNumColumns - 1 $aResult[$iRow_idx + 1][$iCol_idx] = $oCSV.GetCell($iRow_idx, $iCol_idx) Next Next _ArrayDisplay($aResult, '$aResult') EndFunc ;==>_Example_16_CSV_ToArray Func _Example_17_CSV_ToArray($sName_RegExpPattern, $sCity_RegExpPattern) _Log_ChilkatExample('_Example_16_CSV_ToArray') ; https://www.example-code.com/vbscript/csv_columnNames.asp Local $sURL = 'https://epuap.gov.pl/wps/wcm/connect/61e062b9-d981-4526-9f63-c2569263775a/RESP_2016-10-07.csv?MOD=AJPERES' InetGet($sURL, @ScriptDir & '\ePUAP.csv') ConsoleWrite("- Download completed" & @CRLF) Local $oCSV = _Chilkat_CSV_ObjCreate() If @error Then Return SetError(@error, @extended, $CHILKAT_RET_FAILURE) ; Prior to loading the CSV file, indicate that the 1st row ; should be treated as column names: $oCSV.HasColumnNames = 1 ; Load the $oCSV records from the file: Local $sCSVContent = FileRead(@ScriptDir & "\ePUAP.csv") ConsoleWrite("- Load File completed" & @CRLF) Local $iSuccess = $oCSV.LoadFromString($sCSVContent) If ($iSuccess <> 1) Then ConsoleWrite($oCSV.LastErrorText & @CRLF) Return SetError($CHILKAT_ERR_LOADFILE, @extended, $CHILKAT_RET_FAILURE) EndIf ConsoleWrite("- LoadFromString completed" & @CRLF) Local $iNumColumns = $oCSV.NumColumns Local $iNumRows = $oCSV.NumRows Local $aResult[$iNumRows + 1][$iNumColumns] ; First get the column names For $iCol_idx = 0 To $iNumColumns - 1 $aResult[0][$iCol_idx] = $oCSV.GetColumnName($iCol_idx) Next Local $iResult_RowCount = 1 ; First is ColumnName For $iRow_idx = 0 To $iNumRows - 1 If _ StringRegExp($oCSV.GetCell($iRow_idx, 0), $sName_RegExpPattern, $STR_REGEXPMATCH) _ And _ StringRegExp($oCSV.GetCell($iRow_idx, 4), $sCity_RegExpPattern, $STR_REGEXPMATCH) _ Then For $iCol_idx = 0 To $iNumColumns - 1 $aResult[$iResult_RowCount][$iCol_idx] = $oCSV.GetCell($iRow_idx, $iCol_idx) Next $iResult_RowCount += 1 EndIf Next ; strip array size to Number of founds rows ReDim $aResult[$iResult_RowCount][$iNumColumns] ConsoleWrite("- Parsing completed" & @CRLF) _ArrayDisplay($aResult, '$aResult') EndFunc ;==>_Example_17_CSV_ToArray Func _Log_ChilkatExample($sData) ConsoleWrite('>+ ' & $sData & @CRLF) EndFunc ;==>_Log_ChilkatExample REMARK: This UDF is a continuation of this thread:
  2. This UDF was created to facilitate the saving and reading of email configuration. Thanks to @water, @jchd, @Jos for helping in translation of _EmailConfig_GUI_Preset_**() Hope to have _EmailConfig_GUI_Preset_ES() version soon. If you want to create your national version of _EmailConfig_GUI_Preset_**() please do not hesitate ... contribute. _EmailConfig_GUI_Preset_EN() is translated by me and Google Translator (from my national Polish language), so if you have any fix for this please do not hesitate ... contribute. The EmailConfig_Example_STMP_Mailer.au3 is using modified version of Jos SMTP Mailer UDF #AutoIt3Wrapper_UseX64=N #AutoIt3Wrapper_Run_AU3Check=Y #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #Tidy_Parameters=/sort_funcs /reel #include <Array.au3> #include <AutoItConstants.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <Crypt.au3> #include <EditConstants.au3> #include <File.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include "EmailConfig.au3" #include "GDPR.au3" ; https://www.autoitscript.com/forum/files/file/509-gdpr/ Global $oMyRet[2] #Region - EXAMPLE _MY_EXAMPLE__EmailConfig() Func _MY_EXAMPLE__EmailConfig() _GDPR_Crypter_Wrapper(_EmailConfig_ExampleCrypter) _EmailConfig_GUI_Preset_EN() ;~ _EmailConfig_GUI_Preset_DE() ;~ _EmailConfig_GUI_Preset_FR() ;~ _EmailConfig_GUI_Preset_NL() ;~ _EmailConfig_GUI_Preset_PL() _EmailConfig_SaveWrapper(_EmailConfig_SaveToINI) _EmailConfig_LoadWrapper(_EmailConfig_LoadFromINI) _EmailConfig_LoadWrapper() If $IDYES = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON1, 'Question #' & @ScriptLineNumber, _ 'Do you want to set email configuration ?') Then _EmailConfig_ShowGUI() EndIf Local $s_ToAddress = 'whereisyourdestination@your.email.com' Local $s_Subject = 'Testing email sending : ' & @YEAR & @MON & @MDAY & ' ' & @HOUR & @MIN & @SEC Local $s_Body = 'This is only a test' Local $s_Attachments = '' _SMTP_SendEmail_Example($s_ToAddress, $s_Subject, $s_Body, $s_Attachments) EndFunc ;==>_MY_EXAMPLE__EmailConfig Func _EmailConfig_ExampleCrypter($dBinaryData, $bDataAlreadyEncrypted) _Crypt_Startup() ; Start the Crypt library. Local $dResult If $bDataAlreadyEncrypted Then $dResult = _Crypt_DecryptData($dBinaryData, 'securepassword', $CALG_AES_256) ; Decrypt the data using the generic password string. The return value is a binary string. Else $dResult = _Crypt_EncryptData($dBinaryData, 'securepassword', $CALG_AES_256) ; Encrypt the text with the new cryptographic key. EndIf _Crypt_Shutdown() ; Shutdown the Crypt library. Return $dResult EndFunc ;==>_EmailConfig_ExampleCrypter #EndRegion - EXAMPLE ; ; The UDF Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance = "Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0, $tls = 0) Local $oCOM_Error_Handler = ObjEvent("AutoIt.Error", "MyErrFunc") #forceref $oCOM_Error_Handler Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 #forceref $i_Error Local $i_Error_desciption = "" #forceref $i_Error_desciption If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF) $objEmail.AddAttachment($S_Files2Attach[$x]) Else ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF) SetError(1) Return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 Then $IPPort = 25 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ; Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf ; Set security params If $ssl Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True If $tls Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendtls") = True ; Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "High" Case "Normal" $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Normal" Case "Low" $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf $objEmail = "" EndFunc ;==>_INetSmtpMailCom Func _SMTP_SendEmail_Example($s_ToAddress, $s_Subject, $s_Body, $s_Attachments) #Tidy_ILC_Pos=120 Local $aEMAIL_CONFIG = __EmailConfig__API() Local $SmtpServer = $aEMAIL_CONFIG[$EMAIL_CONFIG__22__SMTP_SERVER_NAME][$EMAIL_CONFIG__COL3_SAVELOAD_VALUE] ; address for the smtp-server to use - REQUIRED Local $FromName = $aEMAIL_CONFIG[$EMAIL_CONFIG__02__COMMON_NAME][$EMAIL_CONFIG__COL3_SAVELOAD_VALUE] ; name from who the email was sent Local $FromAddress = $aEMAIL_CONFIG[$EMAIL_CONFIG__03__EMAIL_ADDRESS][$EMAIL_CONFIG__COL3_SAVELOAD_VALUE] ; address from where the mail should come Local $ToAddress = $s_ToAddress ; destination address of the email - REQUIRED Local $Subject = $s_Subject ; subject from the email - can be anything you want it to be Local $Body = $s_Body ; the messagebody from the mail - can be left blank but then you get a blank mail Local $AttachFiles = $s_Attachments ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed Local $CcAddress = "" ; address for cc - leave blank if not needed Local $BccAddress = "" ; address for bcc - leave blank if not needed Local $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" Local $Username = $aEMAIL_CONFIG[$EMAIL_CONFIG__20__SMTP_USER_NAME][$EMAIL_CONFIG__COL3_SAVELOAD_VALUE] ; username for the account used from where the mail gets sent - REQUIRED Local $Password = $aEMAIL_CONFIG[$EMAIL_CONFIG__21__SMTP_PASSWORD][$EMAIL_CONFIG__COL3_SAVELOAD_VALUE] ; password for the account used from where the mail gets sent - REQUIRED Local $IPPort = $aEMAIL_CONFIG[$EMAIL_CONFIG__23__SMTP_PORT_NUMBER][$EMAIL_CONFIG__COL3_SAVELOAD_VALUE] ; port used for sending the mail ; in many country port 25 is not recomended, in such case use 587 instead Local $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS Local $tls = 0 ; enables/disables TLS when required ;~ Local $IPPort = 465 ; GMAIL port used for sending the mail ;~ Local $ssl = 1 ; GMAIL enables/disables secure socket layer sending - put to 1 if using httpS Local $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl, $tls) If @error Then MsgBox(0, "Error sending email", "Error code: " & @error & @CRLF & "Description: " & $rc) EndIf EndFunc ;==>_SMTP_SendEmail_Example ; ; ; Com Error Handler Func MyErrFunc(ByRef $oMyError) Local $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description, 3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1) ; something to check for when this function returns Return EndFunc ;==>MyErrFunc EmailConfig.au3 EmailConfig_Example_STMP_Mailer.au3
  3. Here I found a usefull UDF for POP3. I modified this UDF. You can download it from download section. Below you see old description:
  4. I played around a little with http://www.chilkatsoft.com/ ActiveX components. Here is an example based on examples from this page. #include <FileConstants.au3> #include <MsgBoxConstants.au3> ;~ http://www.chilkatsoft.com/downloads_ActiveX.asp ;~ http://www.chilkatsoft.com/support.asp ;~ http://www.chilkatsoft.com/refdoc/activex.asp ;~ http://www.chilkatsoft.com/refdoc/xChilkatCertStoreRef.html ;~ http://www.chilkatsoft.com/refdoc/xChilkatCertChainRef.html ;~ Email ActiveX Reference Documentation ;~ http://www.chilkatsoft.com/refdoc/xChilkatEmailRef.html ;~ http://www.example-code.com/vbscript/emailObj.asp ;~ http://www.example-code.com/vbscript/pop3.asp Global $_sPOP3_Server = 'xxxxxx' Global $_sPOP3_UserName = 'xxxxxx' Global $_sPOP3_Password = 'xxxxxx' _Example_1_Version() _Example_2_Get_number_of_mesages() _Example_3_Retrieve_UIDLs_from_POP3_Server() _Example_4_Save_Email_Attachments_to_Filesystem() Func _Example_1_Version() Local $oCrypt = ObjCreate("Chilkat_9_5_0.Crypt2") MsgBox(0, '', $oCrypt.Version) EndFunc ;==>_Example_1_Version Func _Example_2_Get_number_of_mesages() ; http://www.example-code.com/vbscript/pop3_mailboxCount.asp ; The mailman object is used for receiving (POP3) ; and sending (SMTP) email. ; This ObjCreate statement uses the new single-DLL ActiveX for v9.5.0 Local $oMailman = ObjCreate("Chilkat_9_5_0.MailMan") ; Any string argument automatically begins the 30-day trial. $success = $oMailman.UnlockComponent("30-day trial") If ($success <> 1) Then MsgBox(0, 'UnlockComponent', $oMailman.LastErrorText) Return EndIf ; Set the POP3 server's hostname $oMailman.MailHost = $_sPOP3_Server ; Set the POP3 login/password. $oMailman.PopUsername = $_sPOP3_UserName $oMailman.PopPassword = $_sPOP3_Password ; Get the number of messages in the mailbox. Local $iNumMessages = $oMailman.GetMailboxCount() MsgBox(0, '', $iNumMessages) EndFunc ;==>_Example_2_Get_number_of_mesages Func _Example_3_Retrieve_UIDLs_from_POP3_Server() ; Retrieve UIDL's from POP3 Server ; http://www.example-code.com/vbscript/pop3_getUidls.asp ; The mailman object is used for receiving (POP3) ; and sending (SMTP) email. ; This ObjCreate statement uses the new single-DLL ActiveX for v9.5.0 Local $oMailman = ObjCreate("Chilkat_9_5_0.MailMan") ; Any string argument automatically begins the 30-day trial. $success = $oMailman.UnlockComponent("30-day trial") If ($success <> 1) Then MsgBox(0, 'UnlockComponent', $oMailman.LastErrorText) Return EndIf ; Set the POP3 server's hostname $oMailman.MailHost = $_sPOP3_Server ; Set the POP3 login/password. $oMailman.PopUsername = $_sPOP3_UserName $oMailman.PopPassword = $_sPOP3_Password ; sa is a Chilkat_9_5_0.StringArray Local $oSA = $oMailman.GetUidls() Local $iCount = $oSA.Count For $i = 0 To $iCount - 1 ConsoleWrite($oSA.GetString($i) & @CRLF) Next EndFunc ;==>_Example_3_Retrieve_UIDLs_from_POP3_Server Func _Example_4_Save_Email_Attachments_to_Filesystem() ; Save Email Attachments to Filesystem ; http://www.example-code.com/vbscript/emailObject_saveAttachments.asp Local $oEmail = ObjCreate("Chilkat_9_5_0.Email") ; Load an email object containing attachments. ; This .eml can be downloaded from: ; http://www.example-code.com/testData/HtmlEmail.eml Local $sEML_FileFullPath = FileOpenDialog('Choose EML File', @ScriptDir, 'EML file (*.eml)', $FD_FILEMUSTEXIST) If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No file(s) were selected.") Return 0 EndIf Local $iSuccess = $oEmail.LoadEml($sEML_FileFullPath) If ($iSuccess <> 1) Then ConsoleWrite($oEmail.LastErrorText & @CRLF) Return 0 EndIf ; If OverwriteExisting is turned on, files with the same ; name are overwritten. If turned off, new/unique filenames ; are automatically generated. The filenames actually saved ; are accessible via the GetAttachmentFilename method. $oEmail.OverwriteExisting = 1 ; Save all attachments to the "myAttachments" subdirectory ; found under the calling process;s current working directory. ; This directory is automatically created if it does not already ; exist. $iSuccess = $oEmail.SaveAllAttachments("myAttachments") If ($iSuccess <> 1) Then ConsoleWrite($oEmail.LastErrorText & @CRLF) Return 0 EndIf ; List the attachment filenames: For $i = 0 To $oEmail.NumAttachments - 1 ConsoleWrite($oEmail.GetAttachmentFilename($i) & @CRLF) Next EndFunc ;==>_Example_4_Save_Email_Attachments_to_Filesystem Best regards mLipok
  5. Version 2.0.1

    1,607 downloads

    I want to present POP3.au3 UDF. Support topic is here: POP3.au3 UDF REMARK: Quoted-printable.au3 author @ProgAndy https://autoit.de/index.php/Thread/11350-UTF8-Sting-Convertieren/?postID=87721#post87721
  6. Any suggestions as to how to download, get, or retrieve email from Google's Gmail? No need to send mail only receive. I thought perhaps JiBE's SSL UDF might work however a reply to a post at his original post says otherwise (Didn't want to hijack his post). I have been using "GAM", "GYB", and "GMAIL Backup"(old), all command line inputs. Running them through a AutoIT script using RUN() and RUNWAIT() works somewhat, but has been unreliable.
×
×
  • Create New...