With this library you can develop your own e-mail client and download e-mails via IMAP and POP3. SSL and TLS are supported.
Functions:
- OpenMailEx()
- Syntax:
Code: Select all
Result = OpenMailEx(ID, Protocol, MailServer$, Port, UserName$, Password$, SSL, ProtocolVersion, @ErrorOutput$)
- Description: Establishes a connection to the mail server.
- Parameter:
- ID: A unique number. #PB_Any can be used to generate the number automatically.
- Protocol: One of the following protocols can be used:
- #PBEx_Mail_Protocol_IMAP
- #PBEx_Mail_Protocol_POP3: Note: Please use this protocol for testing purposes only. This protocol is obsolete and will not be further developed.
- #PBEx_Mail_Protocol_SMTP: Only valid for SendMailEx() and SendMailFileEx().
- MailServer$: The address to the mail server
- Port: Port number
- UserName$: Username or email address for login.
- Password$: Password for login.
- SSL: If 1, then an encrypted connection is established.
- ProtocolVersion: Specifies the protocol version for the encrypted connection. The following constants can be used:
- #PBEx_Mail_ProtocolVersion_SSL30: SSL 3.0
- #PBEx_Mail_ProtocolVersion_TLS10: TLS 1.0
- #PBEx_Mail_ProtocolVersion_TLS11: TLS 1.1
- #PBEx_Mail_ProtocolVersion_TLS12: TLS 1.2
- #PBEx_Mail_ProtocolVersion_TLS13: TLS 1.3
- @ErrorOutput$: If an error occurred, the error message is stored in the variable. This variable must be reserved with 128 characters before passing. Maximum length of the return is 128 characters including the NULL character. If no error description is to be returned for an error, 0 can be passed instead.
- Return value:
- 1: The process was successful. If #PB_Any is used, the ID is returned.
- Example:
Code: Select all
EnableExplicit Global PBEx_Mail #PBEx_Mail_Version$ = "1.1.6.0" #PBEx_Mail_Protocol_IMAP = 0 #PBEx_Mail_Protocol_POP3 = 1 #PBEx_Mail_Protocol_SMTP = 2 #PBEx_Mail_ProtocolVersion_SSL30 = 0 #PBEx_Mail_ProtocolVersion_TLS10 = 1 #PBEx_Mail_ProtocolVersion_TLS11 = 2 #PBEx_Mail_ProtocolVersion_TLS12 = 3 #PBEx_Mail_ProtocolVersion_TLS13 = 4 #PBEx_Mail_Priority_Normal = 0 #PBEx_Mail_Priority_Low = 1 #PBEx_Mail_Priority_High = 2 #PBEx_Mail_Event_NewMail = 0 #PBEx_Mail_Attribute_Unseen = 0 #PBEx_Mail_Attribute_Seen = 32 #PBEx_Mail_SeenType_AllMails = 0 #PBEx_Mail_SeenType_OnlySeenMails = 1 #PBEx_Mail_SeenType_OnlyUnseenMails = 2 #PBEx_Mail_FetchType_AllData = 0 #PBEx_Mail_FetchType_OnlyHeaderData = 1 CompilerIf #PB_Compiler_Processor = #PB_Processor_x86 PBEx_Mail = OpenLibrary(#PB_Any, "PB.Ex_Mail_x86.dll") CompilerElseIf #PB_Compiler_Processor = #PB_Processor_x64 PBEx_Mail = OpenLibrary(#PB_Any, "PB.Ex_Mail_x64.dll") CompilerEndIf If PBEx_Mail Prototype OpenMailEx(ID, Protocol, MailServer.p-Unicode, Port, UserName.p-Unicode, Password.p-Unicode, SSL, ProtocolVersion, ErrorOutput) Global OpenMailEx.OpenMailEx = GetFunction(PBEx_Mail, "OpenMailEx") Prototype CloseMailEx(ID, ErrorOutput) Global CloseMailEx.CloseMailEx = GetFunction(PBEx_Mail, "CloseMailEx") Prototype ExamineMailDirectoryEx(ID, ErrorOutput) Global ExamineMailDirectoryEx.ExamineMailDirectoryEx = GetFunction(PBEx_Mail, "ExamineMailDirectoryEx") Prototype MailDirectoryEntryNameEx(ID, Output, ErrorOutput) Global MailDirectoryEntryNameEx.MailDirectoryEntryNameEx = GetFunction(PBEx_Mail, "MailDirectoryEntryNameEx") Prototype ExamineMailEx(ID, SeenType, FetchType, SortByNew, ErrorOutput) Global ExamineMailEx.ExamineMailEx = GetFunction(PBEx_Mail, "ExamineMailEx") Prototype MailEntrySubjectEx(ID, Output, ErrorOutput) Global MailEntrySubjectEx.MailEntrySubjectEx = GetFunction(PBEx_Mail, "MailEntrySubjectEx") Prototype MailEntryBodyEx(ID, Output, ErrorOutput) Global MailEntryBodyEx.MailEntryBodyEx = GetFunction(PBEx_Mail, "MailEntryBodyEx") Prototype MailEntryFromEx(ID, Output, ErrorOutput) Global MailEntryFromEx.MailEntryFromEx = GetFunction(PBEx_Mail, "MailEntryFromEx") Prototype MailEntryToEx(ID, Output, ErrorOutput) Global MailEntryToEx.MailEntryToEx = GetFunction(PBEx_Mail, "MailEntryToEx") Prototype MailEntryCCEx(ID, Output, ErrorOutput) Global MailEntryCCEx.MailEntryCCEx = GetFunction(PBEx_Mail, "MailEntryCCEx") Prototype MailEntryBCCEx(ID, Output, ErrorOutput) Global MailEntryBCCEx.MailEntryBCCEx = GetFunction(PBEx_Mail, "MailEntryBCCEx") Prototype MailEntryDateEx(ID, ErrorOutput) Global MailEntryDateEx.MailEntryDateEx = GetFunction(PBEx_Mail, "MailEntryDateEx") Prototype MailEntryPriorityEx(ID, ErrorOutput) Global MailEntryPriorityEx.MailEntryPriorityEx = GetFunction(PBEx_Mail, "MailEntryPriorityEx") Prototype FinishMailDirectoryEx(ID, ErrorOutput) Global FinishMailDirectoryEx.FinishMailDirectoryEx = GetFunction(PBEx_Mail, "FinishMailDirectoryEx") Prototype FinishMailEx(ID, ErrorOutput) Global FinishMailEx.FinishMailEx = GetFunction(PBEx_Mail, "FinishMailEx") Prototype IsMailEx(ID, ErrorOutput) Global IsMailEx.IsMailEx = GetFunction(PBEx_Mail, "IsMailEx") Prototype NextMailDirectoryEntryEx(ID, ErrorOutput) Global NextMailDirectoryEntryEx.NextMailDirectoryEntryEx = GetFunction(PBEx_Mail, "NextMailDirectoryEntryEx") Prototype NextMailEntryEx(ID, ErrorOutput) Global NextMailEntryEx.NextMailEntryEx = GetFunction(PBEx_Mail, "NextMailEntryEx") Prototype SetMailDirectoryEx(ID, DirectoryPath.p-Unicode, ErrorOutput) Global SetMailDirectoryEx.SetMailDirectoryEx = GetFunction(PBEx_Mail, "SetMailDirectoryEx") Prototype CreateMailDirectoryEx(ID, DirectoryName.p-Unicode, ErrorOutput) Global CreateMailDirectoryEx.CreateMailDirectoryEx = GetFunction(PBEx_Mail, "CreateMailDirectoryEx") Prototype RenameMailDirectoryEx(ID, OldDirectoryName.p-Unicode, NewDirectoryName.p-Unicode, ErrorOutput) Global RenameMailDirectoryEx.RenameMailDirectoryEx = GetFunction(PBEx_Mail, "RenameMailDirectoryEx") Prototype DeleteMailDirectoryEx(ID, DirectoryPath.p-Unicode, ErrorOutput) 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, Attachments.p-Unicode, ErrorOutput) Global CreateMailEx.CreateMailEx = GetFunction(PBEx_Mail, "CreateMailEx") Prototype BindMailEventEx(ID, Event, PBProcedureHandle, PID, ErrorOutput) Global BindMailEventEx.BindMailEventEx = GetFunction(PBEx_Mail, "BindMailEventEx") Prototype GetMailSubjectEx(ID, MailID, DirectoryPath.p-Unicode, Output, ErrorOutput) Global GetMailSubjectEx.GetMailSubjectEx = GetFunction(PBEx_Mail, "GetMailSubjectEx") Prototype GetMailBodyEx(ID, MailID, DirectoryPath.p-Unicode, Output, ErrorOutput) Global GetMailBodyEx.GetMailBodyEx = GetFunction(PBEx_Mail, "GetMailBodyEx") Prototype GetMailFromEx(ID, MailID, DirectoryPath.p-Unicode, Output, ErrorOutput) Global GetMailFromEx.GetMailFromEx = GetFunction(PBEx_Mail, "GetMailFromEx") Prototype GetMailToEx(ID, MailID, DirectoryPath.p-Unicode, Output, ErrorOutput) Global GetMailToEx.GetMailToEx = GetFunction(PBEx_Mail, "GetMailToEx") Prototype GetMailCCEx(ID, MailID, DirectoryPath.p-Unicode, Output, ErrorOutput) Global GetMailCCEx.GetMailCCEx = GetFunction(PBEx_Mail, "GetMailCCEx") Prototype GetMailBCCEx(ID, MailID, DirectoryPath.p-Unicode, Output, ErrorOutput) Global GetMailBCCEx.GetMailBCCEx = GetFunction(PBEx_Mail, "GetMailBCCEx") Prototype GetMailDateEx(ID, MailID, DirectoryPath.p-Unicode, ErrorOutput) Global GetMailDateEx.GetMailDateEx = GetFunction(PBEx_Mail, "GetMailDateEx") Prototype GetMailPriorityEx(ID, MailID, DirectoryPath.p-Unicode, ErrorOutput) Global GetMailPriorityEx.GetMailPriorityEx = GetFunction(PBEx_Mail, "GetMailPriorityEx") Prototype MailEntryBodySizeEx(ID, ErrorOutput) Global MailEntryBodySizeEx.MailEntryBodySizeEx = GetFunction(PBEx_Mail, "MailEntryBodySizeEx") Prototype MailIDEx(ID, ErrorOutput) Global MailIDEx.MailIDEx = GetFunction(PBEx_Mail, "MailIDEx") Prototype SetMailSubjectEx(ID, MailID, Directory.p-Unicode, Text.p-Unicode, ErrorOutput) Global SetMailSubjectEx.SetMailSubjectEx = GetFunction(PBEx_Mail, "SetMailSubjectEx") Prototype SetMailBodyEx(ID, MailID, Directory.p-Unicode, Text.p-Unicode, ErrorOutput) Global SetMailBodyEx.SetMailBodyEx = GetFunction(PBEx_Mail, "SetMailBodyEx") Prototype SetMailFromEx(ID, MailID, Directory.p-Unicode, Text.p-Unicode, ErrorOutput) Global SetMailFromEx.SetMailFromEx = GetFunction(PBEx_Mail, "SetMailFromEx") Prototype SetMailToEx(ID, MailID, Directory.p-Unicode, Text.p-Unicode, ErrorOutput) Global SetMailToEx.SetMailToEx = GetFunction(PBEx_Mail, "SetMailToEx") Prototype SetMailCCEx(ID, MailID, Directory.p-Unicode, Text.p-Unicode, ErrorOutput) Global SetMailCCEx.SetMailCCEx = GetFunction(PBEx_Mail, "SetMailCCEx") Prototype SetMailBCCEx(ID, MailID, Directory.p-Unicode, Text.p-Unicode, ErrorOutput) Global SetMailBCCEx.SetMailBCCEx = GetFunction(PBEx_Mail, "SetMailBCCEx") Prototype SetMailPriorityEx(ID, MailID, Directory.p-Unicode, Priority, ErrorOutput) Global SetMailPriorityEx.SetMailPriorityEx = GetFunction(PBEx_Mail, "SetMailPriorityEx") Prototype DeleteMailEx(ID, MailID, Directory.p-Unicode, ErrorOutput) Global DeleteMailEx.DeleteMailEx = GetFunction(PBEx_Mail, "DeleteMailEx") Prototype MoveMailEx(ID, MailID, Directory.p-Unicode, TargetDirectory.p-Unicode, ErrorOutput) Global MoveMailEx.MoveMailEx = GetFunction(PBEx_Mail, "MoveMailEx") Prototype CountMailEx(ID, Directory.p-Unicode, ErrorOutput) Global CountMailEx.CountMailEx = GetFunction(PBEx_Mail, "CountMailEx") Prototype CountMailDirectoryEx(ID, ErrorOutput) Global CountMailDirectoryEx.CountMailDirectoryEx = GetFunction(PBEx_Mail, "CountMailDirectoryEx") Prototype SendMailEx(ID, 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") Prototype SaveMailEx(ID, MailID, Directory.p-Unicode, Path.p-Unicode, ErrorOutput) Global SaveMailEx.SaveMailEx = GetFunction(PBEx_Mail, "SaveMailEx") Prototype GetMailHeaderEx(ID, MailID, Directory.p-Unicode, Output, ErrorOutput) Global GetMailHeaderEx.GetMailHeaderEx = GetFunction(PBEx_Mail, "GetMailHeaderEx") Prototype MailEntryHeaderEx(ID, Output, ErrorOutput) Global MailEntryHeaderEx.MailEntryHeaderEx = GetFunction(PBEx_Mail, "MailEntryHeaderEx") Prototype LoadMailEx(ID, Path.p-Unicode, Directory.p-Unicode, ErrorOutput) Global LoadMailEx.LoadMailEx = GetFunction(PBEx_Mail, "LoadMailEx") Prototype SendMailFileEx(ID, Path.p-Unicode, ErrorOutput) 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 Global Output$ = Space(1000000) Global ErrorOutput$ = Space(128) Procedure NewMail(MailID$) Protected MailID = Val(MailID$) GetMailSubjectEx(1, MailID, "", @Output$, @ErrorOutput$) Debug "Subject: " + Output$ GetMailFromEx(1, MailID, "", @Output$, @ErrorOutput$) Debug "From: " + Output$ GetMailToEx(1, MailID, "", @Output$, @ErrorOutput$) Debug "To: " + Output$ Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", GetMailDateEx(1, MailID, "", @ErrorOutput$)) EndProcedure If OpenMailEx(1, #PBEx_Mail_Protocol_IMAP, "imap.gmail.com", 993, "yourmailaddress@gmail.com", "YourPassword", 1, #PBEx_Mail_ProtocolVersion_TLS13, @ErrorOutput$) ; ;Notify automatically when new emails arrive. ; If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) ; ; BindMailEventEx(1, #PBEx_Mail_Event_NewMail, @NewMail(), GetCurrentProcessId_(), @ErrorOutput$) ; ; Repeat ; Select WaitWindowEvent() ; Case #PB_Event_CloseWindow ; End ; EndSelect ; ForEver ; EndIf ; ;Determine all directories (only for IMAP) ; If ExamineMailDirectoryEx(1, @ErrorOutput$) ; While NextMailDirectoryEntryEx(1, @ErrorOutput$) ; MailDirectoryEntryNameEx(1, @Output$, @ErrorOutput$) ; Debug Output$ ; Wend ; ; EndIf ;Determine all mail from inbox ;Or from any directory ;SetMailDirectoryEx(1, "Downloadportale/Chip", @ErrorOutput$) If ExamineMailEx(1, #PBEx_Mail_SeenType_AllMails, #PBEx_Mail_FetchType_AllData, 0, @ErrorOutput$) While NextMailEntryEx(1, @ErrorOutput$) MailEntrySubjectEx(1, @Output$, @ErrorOutput$) Debug "Subject: " + Output$ MailEntryFromEx(1, @Output$, @ErrorOutput$) Debug "From: " + Output$ MailEntryToEx(1, @Output$, @ErrorOutput$) Debug "To: " + Output$ Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MailEntryDateEx(1, @ErrorOutput$)) Debug MailIDEx(1, @ErrorOutput$) Debug Str(CountMailAttachmentsEx(1, @ErrorOutput$)) + " attachment(s)" If ExamineMailAttachmentsEx(1, @ErrorOutput$) While NextMailEntryAttachmentsEx(1, @ErrorOutput$) If MailEntryAttachmentsFileNameEx(1, @Output$, @ErrorOutput$) Debug Output$ EndIf Wend EndIf Debug "--------------------------------------------------" Wend EndIf CloseMailEx(1, @ErrorOutput$) Else Debug ErrorOutput$ EndIf CloseLibrary(PBEx_Mail)
- Syntax:
- CloseMailEx()
- Syntax:
Code: Select all
Result = CloseMailEx(ID, @ErrorOutput$)
- Description: Closes the connection to the mail server.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- ExamineMailDirectoryEx()
- Syntax:
Code: Select all
Result = ExamineMailDirectoryEx(ID, @ErrorOutput$)
- Description: Starts the listing from the directory structure. POP3 does not support directories.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailDirectoryEntryNameEx()
- Syntax:
Code: Select all
Result = MailDirectoryEntryNameEx(ID, @Output, @ErrorOutput$)
- Description: The name of the directory is determined. This function is only valid within the ExamineMailDirectoryEx loop. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- @Output: The name of the directory is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- ExamineMailEx()
- Syntax:
Code: Select all
Result = ExamineMailEx(ID, SeenType, FetchType, SortByNew, @ErrorOutput$)
- Description: Starts the collection from the current directory.
- Parameter:
- ID: The number of the connection.
- SeenType: Determines whether all e-mails or only e-mails that have already been read or have not yet been read are determined. This function is not supported with POP3. The following constants can be used:
- #PBEx_Mail_SeenType_AllMails
- #PBEx_Mail_SeenType_OnlySeenMails
- #PBEx_Mail_SeenType_OnlyUnseenMails
- FetchType: Determines whether all data or only the header data of the e-mails is downloaded. This function is not supported with POP3. The following constants can be used:
- #PBEx_Mail_FetchType_AllData
- #PBEx_Mail_FetchType_OnlyHeaderData
- SortByNew: Defines the order in which e-mails are determined:
- 0: The emails that were created first are determined first.
- 1: The newest e-mails are determined first.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntrySubjectEx()
- Syntax:
Code: Select all
Result = MailEntrySubjectEx(ID, @Output, @ErrorOutput$)
- Description: Determines the subject of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @Output: Subject of the email is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryBodyEx()
- Syntax:
Code: Select all
Result = MailEntryBodyEx(ID, @Output, @ErrorOutput$)
- Description: Determines the content of the e-mail. It can be either plain text or HTML. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @Output: The content of the e-mail is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryFromEx()
- Syntax:
Code: Select all
Result = MailEntryFromEx(ID, @Output, @ErrorOutput$)
- Description: Determines the sender of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @Output: The sender of the e-mail is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryToEx()
- Syntax:
Code: Select all
Result = MailEntryToEx(ID, @Output, @ErrorOutput$)
- Description: Determines the recipient of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @Output: The recipient of the e-mail is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryCCEx()
- Syntax:
Code: Select all
Result = MailEntryCCEx(ID, @Output, @ErrorOutput$)
- Description: Determines the CC recipient (visible recipient) of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @Output: CC recipient of the e-mail is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryBCCEx()
- Syntax:
Code: Select all
Result = MailEntryBCCEx(ID, @Output, @ErrorOutput$)
- Description: Determines the BCC recipient (invisible recipient) of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @Output: BCC recipient of the e-mail is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryDateEx()
- Syntax:
Code: Select all
Result = MailEntryDateEx(ID, @ErrorOutput$)
- Description: Determines the date of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: The date of the e-mail. The value can be used with the date library.
- Syntax:
- MailEntryPriorityEx()
- Syntax:
Code: Select all
Result = MailEntryPriorityEx(ID, @ErrorOutput$)
- Description: Determines the specified priority of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: The priority of the e-mail. The following constants can be queried:
- #PBEx_Mail_Priority_Normal
- #PBEx_Mail_Priority_Low
- #PBEx_Mail_Priority_High
- Syntax:
- FinishMailDirectoryEx()
- Syntax:
Code: Select all
Result = FinishMailDirectoryEx(ID, @ErrorOutput$)
- Description: Closes the listing of the directory structure.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- FinishMailEx()
- Syntax:
Code: Select all
Result = FinishMailEx(ID, @ErrorOutput$)
- Description: Closes the list of the current directory.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- IsMailEx()
- Syntax:
Code: Select all
Result = IsMailEx(ID, @ErrorOutput$)
- Description: Checks if the connection is still valid.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: ID ist gültig.
- Syntax:
- NextMailDirectoryEntryEx()
- Syntax:
Code: Select all
Result = NextMailDirectoryEntryEx(ID, @ErrorOutput$)
- Description: The next directory is determined. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- NextMailEntryEx()
- Syntax:
Code: Select all
Result = NextMailEntryEx(ID, @ErrorOutput$)
- Description: The next e-mail will be determined.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailDirectoryEx()
- Syntax:
Code: Select all
Result = SetMailDirectoryEx(ID, DirectoryPath$, @ErrorOutput$)
- Description: Opens the directory to find the emails in this directory. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- DirectoryPath$: Name or full path of the directory. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- CreateMailDirectoryEx()
- Syntax:
Code: Select all
Result = CreateMailDirectoryEx(ID, DirectoryName$, @ErrorOutput$)
- Description: Creates a new directory. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- DirectoryName$: Name of the directory.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- RenameMailDirectoryEx()
- Syntax:
Code: Select all
Result = RenameMailDirectoryEx(ID, OldDirectoryName$, NewDirectoryName$, @ErrorOutput$)
- Description: Renames an existing directory. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- OldDirectoryName$: Name of the directory.
- NewDirectoryName$: New name for the directory.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- DeleteMailDirectoryEx()
- Syntax:
Code: Select all
Result = DeleteMailDirectoryEx(ID, DirectoryName$, @ErrorOutput$)
- Description: Removes an existing directory. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- DirectoryName$: Name of the directory.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- CreateMailEx()
- Syntax:
Code: Select all
Result = CreateMailEx(ID, Directory$, Subject$, Body$, Priority, From$, ToAddress$, CC$, BCC$, Attachments$, @ErrorOutput$)
- Description: Creates a new email that is not sent.
- Parameter:
- ID: The number of the connection.
- Directory$: Name of the directory
- Subject$: E-mail subject
- Body$: Contents of the e-mail
- Priority: Determination of the priority. One of the following constants can be used:
- #PBEx_Mail_Priority_Normal
- #PBEx_Mail_Priority_Low
- #PBEx_Mail_Priority_High
- From$: E-mail address of the sender.
- ToAddress$: E-mail address of the recipient. Multiple email addresses can be separated with semicolons.
- CC$: E-mail address of the recipient (visible recipient). Multiple email addresses can be separated with semicolons.
- BCC$: E-mail address of the recipient (invisible recipient). Multiple email addresses can be separated with semicolons.
- Attachments$: Full path to the file to be added as an attachment. Multiple attachments can be separated with the | character.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- BindMailEventEx()
- Syntax:
Code: Select all
Result = BindMailEventEx(ID, Event, @PBProcedure(), PID, @ErrorOutput$)
- Description: Link a procedure to an event.
- Parameter:
- ID: The number of the connection.
- Event: Specifies the event to be queried. One of the following constants can be used:
- #PBEx_Mail_Event_NewMail: The event is triggered as soon as new e-mails are available.
- @PBProcedure(): The handle number of the procedure that is automatically called when the specified event is triggered.
- PID: The PID number of your own program.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailSubjectEx()
- Syntax:
Code: Select all
Result = GetMailSubjectEx(ID, MailID, DirectoryPath$, @Output$, @ErrorOutput$)
- Description: Determines the subject using the MailID.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @Output$: The subject is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailBodyEx()
- Syntax:
Code: Select all
Result = GetMailBodyEx(ID, MailID, DirectoryPath$, @Output$, @ErrorOutput$)
- Description: Determines the content using the MailID.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @Output$: The content is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailFromEx()
- Syntax:
Code: Select all
Result = GetMailFromEx(ID, MailID, DirectoryPath$, @Output$, @ErrorOutput$)
- Description: Determines the sender using the MailID.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @Output$: The sender is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailToEx()
- Syntax:
Code: Select all
Result = GetMailToEx(ID, MailID, DirectoryPath$, @Output$, @ErrorOutput$)
- Description: Determines the recipient using the MailID.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @Output$: The receiver is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailCCEx()
- Syntax:
Code: Select all
Result = GetMailCCEx(ID, MailID, DirectoryPath$, @Output$, @ErrorOutput$)
- Description: Determines the CC recipient using the MailID. (visible recipient)
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @Output$: The CC receiver is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailBCCEx()
- Syntax:
Code: Select all
Result = GetMailBCCEx(ID, MailID, DirectoryPath$, @Output$, @ErrorOutput$)
- Description: Determines the BCC recipient using the MailID. (invisible recipient)
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @Output$: The BCC receiver is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailDateEx()
- Syntax:
Code: Select all
Result = GetMailDateEx(ID, MailID, DirectoryPath$, @ErrorOutput$)
- Description: Determines the date using the MailID.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: The date of the e-mail. The value can be used with the date library.
- Syntax:
- GetMailPriorityEx()
- Syntax:
Code: Select all
Result = GetMailPriorityEx(ID, MailID, DirectoryPath$, @ErrorOutput$)
- Description: Determines the priority using the MailID.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: The priority of the e-mail. The following constants can be queried:
- #PBEx_Mail_Priority_Normal
- #PBEx_Mail_Priority_Low
- #PBEx_Mail_Priority_High
- Syntax:
- MailEntryBodySizeEx()
- Syntax:
Code: Select all
Result = MailEntryBodySizeEx(ID, @ErrorOutput$)
- Description: Determines the size in bytes for allocating memory.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: Size in bytes
- Syntax:
- MailIDEx()
- Syntax:
Code: Select all
Result = MailIDEx(ID, @ErrorOutput$)
- Description: Determines the mail ID for reading or changing properties. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: ID of the e-mail
- Syntax:
- SetMailSubjectEx()
- Syntax:
Code: Select all
Result = SetMailSubjectEx(ID, MailID, Directory$, Text$, @ErrorOutput$)
- Description: Changes the subject using the mail ID. Due to the specification that the e-mail must not be modified subsequently, the changed e-mail is saved as a new e-mail. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name of the directory
- Text$: Changes with the specified value.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailBodyEx()
- Syntax:
Code: Select all
Result = SetMailBodyEx(ID, MailID, Directory$, Text$, @ErrorOutput$)
- Description: Changes the content using the mail ID. Due to the specification that the e-mail must not be modified subsequently, the changed e-mail is saved as a new e-mail. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name of the directory
- Text$: Changes with the specified value.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailFromEx()
- Syntax:
Code: Select all
Result = SetMailFromEx(ID, MailID, Directory$, Text$, @ErrorOutput$)
- Description: Changes the sender using the mail ID. Due to the specification that the e-mail must not be modified subsequently, the changed e-mail is saved as a new e-mail. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name of the directory
- Text$: Changes with the specified value.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailToEx()
- Syntax:
Code: Select all
Result = SetMailToEx(ID, MailID, Directory$, Text$, @ErrorOutput$)
- Description: Changes the recipient using the mail ID. Due to the specification that the e-mail must not be modified subsequently, the changed e-mail is saved as a new e-mail. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name of the directory
- Text$: Changes with the specified value. Multiple email addresses can be separated with semicolons.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailCCEx()
- Syntax:
Code: Select all
Result = SetMailCCEx(ID, MailID, Directory$, Text$, @ErrorOutput$)
- Description: Changes the CC recipient (visible recipient) using the mail ID. Due to the specification that the e-mail must not be modified subsequently, the changed e-mail is saved as a new e-mail. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name of the directory
- Text$: Changes with the specified value. Multiple email addresses can be separated with semicolons.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailBCCEx()
- Syntax:
Code: Select all
Result = SetMailBCCEx(ID, MailID, Directory$, Text$, @ErrorOutput$)
- Description: Changes the BCC recipient (invisible recipient) using the mail ID. Due to the specification that the e-mail must not be modified subsequently, the changed e-mail is saved as a new e-mail. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name of the directory
- Text$: Changes with the specified value. Multiple email addresses can be separated with semicolons.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailPriorityEx()
- Syntax:
Code: Select all
Result = SetMailPriorityEx(ID, MailID, Directory$, Priority, @ErrorOutput$)
- Description: Changes the priority using the mail ID. Due to the specification that the e-mail must not be modified subsequently, the changed e-mail is saved as a new e-mail. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name of the directory
- Priority: Priority of the e-mail. One of the following constants can be used:
- #PBEx_Mail_Priority_Normal
- #PBEx_Mail_Priority_Low
- #PBEx_Mail_Priority_High
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- DeleteMailEx()
- Syntax:
Code: Select all
Result = DeleteMailEx(ID, MailID, Directory$, @ErrorOutput$)
- Description: Removes the e-mail using the mail ID and directory. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name or full path to the directory where the specified e-mail is located. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MoveMailEx()
- Syntax:
Code: Select all
Result = MoveMailEx(ID, MailID, Directory$, TargetDirectory$, @ErrorOutput$)
- Description: Moves the e-mail to the specified target directory using the mail ID and the source directory. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: ID of the e-mail
- Directory$: Name or full path to the directory where the specified e-mail is located. If empty, the inbox directory is selected.
- TargetDirectory$: Name or full path to the directory to which the e-mail is to be moved. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- CountMailEx()
- Syntax:
Code: Select all
Result = CountMailEx(ID, Directory$, @ErrorOutput$)
- Description: Determines how many e-mails exist in the specified directory.
- Parameter:
- ID: The number of the connection.
- Directory$: Name or full path to the directory. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: Number of e-mails.
- Syntax:
- CountMailDirectoryEx()
- Syntax:
Code: Select all
Result = CountMailDirectoryEx(ID, @ErrorOutput$)
- Description: Determines how many directories exist. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: Number of directories.
- Syntax:
- SendMailEx()
- Syntax:
Code: Select all
Result = SendMailEx(ID, Subject$, Body$, Priority, From$, ToAddress$, CC$, BCC$, Attachments$, @ErrorOutput$)
- Description: Sends a new e-mail.
- Parameter:
- ID: The number of the connection.
- Subject$: E-mail subject
- Body$: Contents of the e-mail
- Priority: Determination of the priority. One of the following constants can be used:
- #PBEx_Mail_Priority_Normal
- #PBEx_Mail_Priority_Low
- #PBEx_Mail_Priority_High
- From$: E-mail address of the sender.
- ToAddress$: E-mail address of the recipient. Multiple email addresses can be separated with semicolons.
- CC$: E-mail address of the recipient (visible recipient). Multiple email addresses can be separated with semicolons.
- BCC$: E-mail address of the recipient (invisible recipient). Multiple email addresses can be separated with semicolons.
- Attachments$: Full path to the file to be added as an attachment. Multiple attachments can be separated with the | character. Aliases are supported. Example: OriginalFile.zip<AliasFile.zip>
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SaveMailEx()
- Syntax:
Code: Select all
Result = SaveMailEx(ID, MailID, Directory$, Path$, @ErrorOutput$)
- Description: Saves an existing e-mail as an EML file on the hard disk.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- Path$: Complete path incl. file name where the e-mail should be exported to.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailHeaderEx()
- Syntax:
Code: Select all
Result = GetMailHeaderEx(ID, MailID, Directory$, @Output$, @ErrorOutput$)
- Description: Determines the complete header of the e-mail using the MailID.
- Parameter:
- ID: The number of the connection.
- MailID: The number of a single e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @Output$: The header is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryHeaderEx()
- Syntax:
Code: Select all
Result = MailEntryHeaderEx(ID, @Output, @ErrorOutput$)
- Description: Determines the header of the e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @Output$: The header is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- LoadMailEx()
- Syntax:
Code: Select all
Result = LoadMailEx(ID, Path$, Directory$, @ErrorOutput$)
- Description: Imports an EML file into the specified directory. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- Path$: Full path to the EML file.
- Directory$: Name or full path to the directory. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: MailID of the imported e-mail.
- Syntax:
- SendMailFileEx()
- Syntax:
Code: Select all
Result = SendMailFileEx(ID, Path$, @ErrorOutput$)
- Description: Sends an e-mail using an EML file.
- Parameter:
- ID: The number of the connection.
- Path$: Full path to the EML file.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- CountMailAttachmentsEx()
- Syntax:
Code: Select all
Result = CountMailAttachmentsEx(ID, @ErrorOutput$)
- Description: Determines how many attachments exist in the current e-mail. This function is only valid within the ExamineMailEx loop.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: Number of attachments
- Syntax:
- ExamineMailAttachmentsEx()
- Syntax:
Code: Select all
Result = ExamineMailAttachmentsEx(ID, @ErrorOutput$)
- Description: Starts the list of attachments from the current e-mail. This function is only valid within the ExamineMailEx loop or if GetMailAttachmentsEx() was previously called.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- NextMailEntryAttachmentsEx()
- Syntax:
Code: Select all
Result = NextMailEntryAttachmentsEx(ID, @ErrorOutput$)
- Description: The next attachment of the current e-mail is determined.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryAttachmentsFileNameEx()
- Syntax:
Code: Select all
Result = MailEntryAttachmentsFileNameEx(ID, @Output, @ErrorOutput$)
- Description: Determines the file name of the attachment from the current e-mail. This function is only valid within the ExamineMailAttachmentsEx loop or if GetMailAttachmentsEx() was previously called.
- Parameter:
- ID: The number of the connection.
- @Output: File name of the attachment is stored in this variable.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SaveMailEntryAttachmentsEx()
- Syntax:
Code: Select all
Result = SaveMailEntryAttachmentsEx(ID, Path$, @ErrorOutput$)
- Description: Saves the attachment as a file on the hard disk. This function is only valid within the ExamineMailAttachmentsEx loop or if GetMailAttachmentsEx() was called before.
- Parameter:
- ID: The number of the connection.
- Path$: Complete path including file name to which the attachment should be exported.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- FinishMailAttachmentsEx()
- Syntax:
Code: Select all
Result = FinishMailAttachmentsEx(ID, @ErrorOutput$)
- Description: Closes the list of attachments from the current email. This function is only valid within the ExamineMailEx loop or if GetMailAttachmentsEx() was previously called.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- GetMailAttachmentsEx()
- Syntax:
Code: Select all
Result = GetMailAttachmentsEx(ID, MailID, DirectoryPath$, @ErrorOutput$)
- Description: Defines the e-mail for the list of attachments. This function can be called before the ExamineMailAttachmentsEx loop so that the ExamineMailAttachmentsEx() function does not find all e-mails but the specified e-mail.
- Parameter:
- ID: The number of the connection.
- MailID: Die Nummer der E-Mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- SetMailAttachmentsEx()
- Syntax:
Code: Select all
Result = SetMailAttachmentsEx(ID, MailID, DirectoryPath$, Attachments$, @ErrorOutput$)
- Description: Adds files as attachments.
- Parameter:
- ID: The number of the connection.
- MailID: The number of the e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- Attachments$: Full path to the file to be added as an attachment. Multiple attachments can be separated with the | character.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
- MailEntryAttributeEx()
- Syntax:
Code: Select all
Result = MailEntryAttributeEx(ID, @ErrorOutput$)
- Description: Determines the status of the e-mail. This function is only valid within the ExamineMailEx loop. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: The following constants can be queried:
- #PBEx_Mail_Attribute_Unseen: E-mail has not yet been read.
- #PBEx_Mail_Attribute_Seen: E-mail has already been read.
- Syntax:
- GetMailAttributeEx()
- Syntax:
Code: Select all
Result = GetMailAttributeEx(ID, MailID, DirectoryPath$, @ErrorOutput$)
- Description: Determines the status of the e-mail using the MailID. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: The number of the e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value: The following constants can be queried:
- #PBEx_Mail_Attribute_Unseen: E-mail has not yet been read.
- #PBEx_Mail_Attribute_Seen: E-mail has already been read.
- Syntax:
- SetMailAttributeEx()
- Syntax:
Code: Select all
Result = SetMailAttributeEx(ID, MailID, DirectoryPath$, Attributes, @ErrorOutput$)
- Description: Changes the status of the e-mail using the MailID. This function is not supported with POP3.
- Parameter:
- ID: The number of the connection.
- MailID: The number of the e-mail.
- DirectoryPath$: The name or full path to the directory where the specified email is located. If empty, the inbox directory is selected.
- Attributes: The following constants can be used:
- #PBEx_Mail_Attribute_Unseen: E-mail has not yet been read.
- #PBEx_Mail_Attribute_Seen: E-mail has already been read.
- @ErrorOutput$: If an error occurs, the error message is stored in the string variable.
- Return value:
- 1: The process was successful.
- Syntax:
Depending on the number of e-mails in a directory and the speed Internet, it may take some time.
System requirements:
- Windows Vista or higher
- .NET Framework 4.8 or higher
- Unicode activation (default from PB 5.50)
The following copyright texts must be provided:
Download: https://www.rsbasic.de/downloads/downlo ... x_Mail.zipCopyright (c) 2012-2014 Torben Könke
MimeKit is Copyright (C) 2012-2018 Xamarin Inc.
Copyright © 2019 RSBasic.de
I would be very pleased about feedbacks, improvement suggestions, error messages or wishes. If you want to support me, you can also donate something. Thanks