|
@ -8,6 +8,8 @@ Global PBEx_Mail |
|
|
#PBEx_Mail_Priority_Low = 1 |
|
|
#PBEx_Mail_Priority_Low = 1 |
|
|
#PBEx_Mail_Priority_High = 2 |
|
|
#PBEx_Mail_Priority_High = 2 |
|
|
#PBEx_Mail_Event_NewMail = 0 |
|
|
#PBEx_Mail_Event_NewMail = 0 |
|
|
|
|
|
#PBEx_Mail_Attribute_Unseen = 0 |
|
|
|
|
|
#PBEx_Mail_Attribute_Seen = 32 |
|
|
|
|
|
|
|
|
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86 |
|
|
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86 |
|
|
PBEx_Mail = OpenLibrary(#PB_Any, "PB.Ex_Mail_x86.dll") |
|
|
PBEx_Mail = OpenLibrary(#PB_Any, "PB.Ex_Mail_x86.dll") |
|
@ -60,7 +62,7 @@ If PBEx_Mail |
|
|
Global RenameMailDirectoryEx.RenameMailDirectoryEx = GetFunction(PBEx_Mail, "RenameMailDirectoryEx") |
|
|
Global RenameMailDirectoryEx.RenameMailDirectoryEx = GetFunction(PBEx_Mail, "RenameMailDirectoryEx") |
|
|
Prototype DeleteMailDirectoryEx(ID, DirectoryPath.p-Unicode, ErrorOutput) |
|
|
Prototype DeleteMailDirectoryEx(ID, DirectoryPath.p-Unicode, ErrorOutput) |
|
|
Global DeleteMailDirectoryEx.DeleteMailDirectoryEx = GetFunction(PBEx_Mail, "DeleteMailDirectoryEx") |
|
|
Global DeleteMailDirectoryEx.DeleteMailDirectoryEx = GetFunction(PBEx_Mail, "DeleteMailDirectoryEx") |
|
|
Prototype CreateMailEx(ID, Directory.p-Unicode, Subject.p-Unicode, Body.p-Unicode, Priority, From.p-Unicode, ToAddress.p-Unicode, CC.p-Unicode, BCC.p-Unicode, ErrorOutput) |
|
|
Prototype CreateMailEx(ID, Directory.p-Unicode, Subject.p-Unicode, Body.p-Unicode, Priority, From.p-Unicode, ToAddress.p-Unicode, CC.p-Unicode, BCC.p-Unicode, Attachments.p-Unicode, ErrorOutput) |
|
|
Global CreateMailEx.CreateMailEx = GetFunction(PBEx_Mail, "CreateMailEx") |
|
|
Global CreateMailEx.CreateMailEx = GetFunction(PBEx_Mail, "CreateMailEx") |
|
|
Prototype BindMailEventEx(ID, Event, PBProcedureHandle, PID, ErrorOutput) |
|
|
Prototype BindMailEventEx(ID, Event, PBProcedureHandle, PID, ErrorOutput) |
|
|
Global BindMailEventEx.BindMailEventEx = GetFunction(PBEx_Mail, "BindMailEventEx") |
|
|
Global BindMailEventEx.BindMailEventEx = GetFunction(PBEx_Mail, "BindMailEventEx") |
|
@ -106,7 +108,7 @@ If PBEx_Mail |
|
|
Global CountMailEx.CountMailEx = GetFunction(PBEx_Mail, "CountMailEx") |
|
|
Global CountMailEx.CountMailEx = GetFunction(PBEx_Mail, "CountMailEx") |
|
|
Prototype CountMailDirectoryEx(ID, ErrorOutput) |
|
|
Prototype CountMailDirectoryEx(ID, ErrorOutput) |
|
|
Global CountMailDirectoryEx.CountMailDirectoryEx = GetFunction(PBEx_Mail, "CountMailDirectoryEx") |
|
|
Global CountMailDirectoryEx.CountMailDirectoryEx = GetFunction(PBEx_Mail, "CountMailDirectoryEx") |
|
|
Prototype SendMailEx(ID, MailServer.p-Unicode, Port, UserName.p-Unicode, Password.p-Unicode, SSL, Subject.p-Unicode, Body.p-Unicode, Priority, From.p-Unicode, ToAddress.p-Unicode, CC.p-Unicode, BCC.p-Unicode, ErrorOutput) |
|
|
Prototype SendMailEx(ID, MailServer.p-Unicode, Port, UserName.p-Unicode, Password.p-Unicode, SSL, Subject.p-Unicode, Body.p-Unicode, Priority, From.p-Unicode, ToAddress.p-Unicode, CC.p-Unicode, BCC.p-Unicode, Attachments.p-Unicode, ErrorOutput) |
|
|
Global SendMailEx.SendMailEx = GetFunction(PBEx_Mail, "SendMailEx") |
|
|
Global SendMailEx.SendMailEx = GetFunction(PBEx_Mail, "SendMailEx") |
|
|
Prototype SaveMailEx(ID, MailID, Directory.p-Unicode, Path.p-Unicode, ErrorOutput) |
|
|
Prototype SaveMailEx(ID, MailID, Directory.p-Unicode, Path.p-Unicode, ErrorOutput) |
|
|
Global SaveMailEx.SaveMailEx = GetFunction(PBEx_Mail, "SaveMailEx") |
|
|
Global SaveMailEx.SaveMailEx = GetFunction(PBEx_Mail, "SaveMailEx") |
|
@ -118,11 +120,33 @@ If PBEx_Mail |
|
|
Global LoadMailEx.LoadMailEx = GetFunction(PBEx_Mail, "LoadMailEx") |
|
|
Global LoadMailEx.LoadMailEx = GetFunction(PBEx_Mail, "LoadMailEx") |
|
|
Prototype SendMailFileEx(ID, MailServer.p-Unicode, Port, UserName.p-Unicode, Password.p-Unicode, SSL, Path.p-Unicode, ErrorOutput) |
|
|
Prototype SendMailFileEx(ID, MailServer.p-Unicode, Port, UserName.p-Unicode, Password.p-Unicode, SSL, Path.p-Unicode, ErrorOutput) |
|
|
Global SendMailFileEx.SendMailFileEx = GetFunction(PBEx_Mail, "SendMailFileEx") |
|
|
Global SendMailFileEx.SendMailFileEx = GetFunction(PBEx_Mail, "SendMailFileEx") |
|
|
|
|
|
Prototype CountMailAttachmentsEx(ID, ErrorOutput) |
|
|
|
|
|
Global CountMailAttachmentsEx.CountMailAttachmentsEx = GetFunction(PBEx_Mail, "CountMailAttachmentsEx") |
|
|
|
|
|
Prototype ExamineMailAttachmentsEx(ID, ErrorOutput) |
|
|
|
|
|
Global ExamineMailAttachmentsEx.ExamineMailAttachmentsEx = GetFunction(PBEx_Mail, "ExamineMailAttachmentsEx") |
|
|
|
|
|
Prototype NextMailEntryAttachmentsEx(ID, ErrorOutput) |
|
|
|
|
|
Global NextMailEntryAttachmentsEx.NextMailEntryAttachmentsEx = GetFunction(PBEx_Mail, "NextMailEntryAttachmentsEx") |
|
|
|
|
|
Prototype MailEntryAttachmentsFileNameEx(ID, Output, ErrorOutput) |
|
|
|
|
|
Global MailEntryAttachmentsFileNameEx.MailEntryAttachmentsFileNameEx = GetFunction(PBEx_Mail, "MailEntryAttachmentsFileNameEx") |
|
|
|
|
|
Prototype SaveMailEntryAttachmentsEx(ID, Path.p-Unicode, ErrorOutput) |
|
|
|
|
|
Global SaveMailEntryAttachmentsEx.SaveMailEntryAttachmentsEx = GetFunction(PBEx_Mail, "SaveMailEntryAttachmentsEx") |
|
|
|
|
|
Prototype FinishMailAttachmentsEx(ID, ErrorOutput) |
|
|
|
|
|
Global FinishMailAttachmentsEx.FinishMailAttachmentsEx = GetFunction(PBEx_Mail, "FinishMailAttachmentsEx") |
|
|
|
|
|
Prototype GetMailAttachmentsEx(ID, MailID, Directory.p-Unicode, ErrorOutput) |
|
|
|
|
|
Global GetMailAttachmentsEx.GetMailAttachmentsEx = GetFunction(PBEx_Mail, "GetMailAttachmentsEx") |
|
|
|
|
|
Prototype SetMailAttachmentsEx(ID, MailID, Directory.p-Unicode, Attachments.p-Unicode, ErrorOutput) |
|
|
|
|
|
Global SetMailAttachmentsEx.SetMailAttachmentsEx = GetFunction(PBEx_Mail, "SetMailAttachmentsEx") |
|
|
|
|
|
Prototype MailEntryAttributeEx(ID, ErrorOutput) |
|
|
|
|
|
Global MailEntryAttributeEx.MailEntryAttributeEx = GetFunction(PBEx_Mail, "MailEntryAttributeEx") |
|
|
|
|
|
Prototype SetMailAttributeEx(ID, MailID, Directory.p-Unicode, Attributes, ErrorOutput) |
|
|
|
|
|
Global SetMailAttributeEx.SetMailAttributeEx = GetFunction(PBEx_Mail, "SetMailAttributeEx") |
|
|
|
|
|
Prototype GetMailAttributeEx(ID, MailID, Directory.p-Unicode, ErrorOutput) |
|
|
|
|
|
Global GetMailAttributeEx.GetMailAttributeEx = GetFunction(PBEx_Mail, "GetMailAttributeEx") |
|
|
|
|
|
|
|
|
EndIf |
|
|
EndIf |
|
|
|
|
|
|
|
|
Global Output$ = Space(1000000) |
|
|
Global Output$ = Space(1000000) |
|
|
Global ErrorOutput$ = "" |
|
|
Global ErrorOutput$ = Space(128) |
|
|
|
|
|
|
|
|
Procedure NewMail(MailID$) |
|
|
Procedure NewMail(MailID$) |
|
|
Protected MailID = Val(MailID$) |
|
|
Protected MailID = Val(MailID$) |
|
@ -164,20 +188,30 @@ If OpenMailEx(1, #PBEx_Mail_Protocol_IMAP, "imap.gmail.com", 993, "yourmailaddre |
|
|
;Determine all mail from inbox |
|
|
;Determine all mail from inbox |
|
|
;Or from any directory |
|
|
;Or from any directory |
|
|
;SetMailDirectoryEx(1, "Downloadportale/Chip", @ErrorOutput$) |
|
|
;SetMailDirectoryEx(1, "Downloadportale/Chip", @ErrorOutput$) |
|
|
; If ExamineMailEx(1, @ErrorOutput$) |
|
|
If ExamineMailEx(1, @ErrorOutput$) |
|
|
; While NextMailEntryEx(1, @ErrorOutput$) |
|
|
While NextMailEntryEx(1, @ErrorOutput$) |
|
|
; MailEntrySubjectEx(1, @Output$, @ErrorOutput$) |
|
|
MailEntrySubjectEx(1, @Output$, @ErrorOutput$) |
|
|
; Debug "Subject: " + Output$ |
|
|
Debug "Subject: " + Output$ |
|
|
; MailEntryFromEx(1, @Output$, @ErrorOutput$) |
|
|
MailEntryFromEx(1, @Output$, @ErrorOutput$) |
|
|
; Debug "From: " + Output$ |
|
|
Debug "From: " + Output$ |
|
|
; MailEntryToEx(1, @Output$, @ErrorOutput$) |
|
|
MailEntryToEx(1, @Output$, @ErrorOutput$) |
|
|
; Debug "To: " + Output$ |
|
|
Debug "To: " + Output$ |
|
|
; Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MailEntryDateEx(1, @ErrorOutput$)) |
|
|
Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MailEntryDateEx(1, @ErrorOutput$)) |
|
|
; Debug MailIDEx(1, @ErrorOutput$) |
|
|
Debug MailIDEx(1, @ErrorOutput$) |
|
|
; Debug "--------------------------------------------------" |
|
|
Debug Str(CountMailAttachmentsEx(1, @ErrorOutput$)) + " attachment(s)" |
|
|
; Wend |
|
|
|
|
|
; |
|
|
If ExamineMailAttachmentsEx(1, @ErrorOutput$) |
|
|
; EndIf |
|
|
While NextMailEntryAttachmentsEx(1, @ErrorOutput$) |
|
|
|
|
|
If MailEntryAttachmentsFileNameEx(1, @Output$, @ErrorOutput$) |
|
|
|
|
|
Debug Output$ |
|
|
|
|
|
EndIf |
|
|
|
|
|
Wend |
|
|
|
|
|
EndIf |
|
|
|
|
|
|
|
|
|
|
|
Debug "--------------------------------------------------" |
|
|
|
|
|
Wend |
|
|
|
|
|
|
|
|
|
|
|
EndIf |
|
|
|
|
|
|
|
|
CloseMailEx(1, @ErrorOutput$) |
|
|
CloseMailEx(1, @ErrorOutput$) |
|
|
Else |
|
|
Else |
|
@ -186,14 +220,14 @@ EndIf |
|
|
|
|
|
|
|
|
CloseLibrary(PBEx_Mail) |
|
|
CloseLibrary(PBEx_Mail) |
|
|
|
|
|
|
|
|
; IDE Options = PureBasic 5.60 (Windows - x64) |
|
|
; IDE Options = PureBasic 5.70 LTS (Windows - x64) |
|
|
; CursorPosition = 145 |
|
|
; CursorPosition = 155 |
|
|
; FirstLine = 117 |
|
|
; FirstLine = 123 |
|
|
; Folding = - |
|
|
; Folding = - |
|
|
; EnableXP |
|
|
; EnableXP |
|
|
; EnableUser |
|
|
; EnableUser |
|
|
; Executable = PB.Ex_MSSQL.exe |
|
|
; Executable = PB.Ex_MSSQL.exe |
|
|
; CompileSourceDirectory |
|
|
; CompileSourceDirectory |
|
|
; EnableCompileCount = 650 |
|
|
; EnableCompileCount = 777 |
|
|
; EnableBuildCount = 7 |
|
|
; EnableBuildCount = 7 |
|
|
; EnableUnicode |
|
|
; EnableUnicode |