Porting Guide
Porting Older Database to use new POP3it Pro Functions
This document is for users who have developed databases using the Classic version of POP3it and wish to upgrade to the new POP3it Pro functions. By updating your databases to the new functions, you will be able to take full advantage of the new features.
Notes:
POP3it Pro includes the CheckAccount function that does most of the downloading process in a single script step, and without the need for multiple and complex scripting like the Classic version of POP3it used. If you simply need to download email into your database without special processing/scripting in the middle of the downloading process, this may work for you. This can save you time converting all the Old Style functions to the New Style, and instead replace it all with a single script step. You can find examples that demonstrate this in the Example Databases section of the Knowledge Base. If you need help determining if this will work for you, please contact us.
POP3it Pro does have a “Backward Compatibility” option in its Configuration Dialog (accessible through the FileMaker(R) Pro Preferences dialog). Using this option should allow you to use your old databases with POP3it Pro without any scripting changes. However, in some cases Backward Compatibility may not work and it is recommended that all users upgrade their scripts to the new functions. By setting the “Backward Compatibility” option to “Both”, you will be able to upgrade your scripts as you get to them, allowing you to have a mix of Old- and New-style functions. For more information about backward compatibility, see the “How do I turn on the Old Style Functions in the Pro plug-ins” FAQ article.
As of v5.1.0, Backward Compatibility has been removed from the plug-in.
NoteThe backward compatibility option does not work under all versions of FileMaker.
Mac
Works: FileMaker 7–13
Does not Work: FileMaker 14 (32-bit and 64-bit), FileMaker Pro 11.0v1 (update to 11.0v4)
Windows
Works: FileMaker 7–13, FileMaker 14 32-bit
Does not Work: FileMaker 14 64-bit
Not all of the Function Equivalents below will be direct equivalents. There may be some functions that take more or less parameters and there may be instances where more than one Classic function is required to do the same as only one Pro function and vice versa. As an example, the Connect function now takes the name of an Account to connect to, which means you may have to use other functions to set up the Account first.
To determine what parameters are in your existing Old Style functions, see the External Function Reference section of the Classic POP3it Guide.
Example
Assume you have a calculation like the following that uses the Old Style Register function.
External(“POP3-Register”, “John|Doe|123–4567–890”)
Find the “POP3-Register” function in the left column of the list at the end of this page. The New Style equivalent is the “POP3it_Register” function, so find that function in the Function Reference to see how it is used.
POP3it_Register ( FirstName ; LastName ; LicenseKey ; Option )
Next, we need to determine what parameters we are using in the Old Style function. To do so, find the Old Style function in the Classic Plug-in Function Browser. From the Classic Plug-in Function Browser, we see the function looks like:
External(“POP3-Register”, “First Name|Last name|Serial Number”)
This tells us that the “John” value of our Old Style Function is the “First Name” parameter, the “Doe” value is the “Last Name” parameter, and “123–4567–890” is the Serial Number/LicenseKey. Now we plug these values into the New Style function, which would look like:
POP3it_Register ( “John”; “Doe” ; “123–4567–890” )
Since we did not need the optional “Option” parameter, it was omitted from the New Style function. Be sure to check the Function Reference to see what each parameter does and which are optional.
Conversion Chart
Below you will find an alphabetical list of old-style functions with their new-style equivalents.
Old-Style to New-Style | |
---|---|
Old-Style | New-Style |
POP3-AcquireFirst | Use POP3it_Adv_GoToMessage with the "Which" parameter set to First. |
POP3-AcquireNext | Use POP3it_Adv_GoToMessage with the "Which" parameter set to Next. |
POP3-APOP | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "AuthType" as the "OptionName" parameter. |
POP3-AttachPath | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "AttachPath" as the "OptionName" parameter. |
POP3-AutoCheckEmail | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "AutoCheckScript" as the "OptionName" parameter. Note, you will also need to set the AutoCheck and AutoCheckInterval options for each account in order to use the AutoCheckScript option. |
POP3-AutoDelete | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "AutoDelete" as the "OptionName" parameter. Note, you will also need to set the AutoDeleteInterval option for each account in order to use the AutoDelete option. |
POP3-CloseConnection | POP3it_Adv_Disconnect. Note, the POP3-CloseConnection function was removed in the Classic POP3it v3.0 plug-in and renamed POP3-Disconnect. The POP3-CloseConnection function does not work with POP3it Pro's backward compatibility option. |
POP3-Connect | POP3it_Adv_Connect |
POP3-CurrAll | POP3it_Adv_GetFullSource. Note, POP3it_Adv_GetFullSource does not download attachments like the POP3-CurrAll function did. Use the POP3it_Adv_SaveAttachment function to download attachments. |
POP3-CurrAttach | POP3it_Adv_SaveAttachment |
POP3-CurrBody | POP3it_Adv_GetBody |
POP3-CurrBodyType | POP3it_Adv_HasBodyType |
POP3-CurrDate | POP3it_Adv_GetDate |
POP3-CurrDelete | POP3it_Adv_Delete |
POP3-CurrFrom | Use POP3it_Adv_GetHeader with the parameter "From". |
POP3-CurrHead | POP3it_Adv_GetHeader. Note, the POP3-CurrHead function was removed in the Classic POP3it v3.0 plug-in. The POP3-CurrHead function was combined with the POP3-CurrHeader function. The POP3-CurrHead function does not work with POP3it Pro's backward compatibility option. |
POP3-CurrHeader | POP3it_Adv_GetHeader |
POP3-CurrHTMLExport | No Equivalent. When POP3it_Adv_GetBody is used to download the HTML Body, the associated inline images are extracted to the main attachment path, and then the HTML can be exported using FileMaker's Export Field Contents script step. Alternatively, the HTML can be rendered in a Web Viewer object without needing to export it to a file. |
POP3-CurrSize | POP3it_Adv_GetSize |
POP3-CurrSubject | Use POP3it_Adv_GetHeader with the parameter "Subject". |
POP3-CurrTo | Use POP3it_Adv_GetHeader with the parameter "To". |
POP3-CurrUniqueID | POP3it_Adv_GetUniqueID |
POP3-DeleteAll | POP3it_Adv_DeleteAll |
POP3-Disconnect | POP3it_Adv_Disconnect |
POP3-DlgAttachPath | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "AttachPath" as the "OptionName" parameter. The POP3it_Adv_SetAccountOption function could be used in conjunction with POP3it_File_SelectFolderWithDialog to replicate the behavior of the POP3-DlgAttachPath function. |
POP3-DlgHTMLExportPath | No Equivalent. The Pro plug-in does not export the HTML Body like the Classic plug-in. See the POP3-CurrHTMLExport function for more information. |
POP3-HideStatus | Use POP3it_StatusWindow with the parameter "Hide". |
POP3-Host | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "Host" as the "OptionName" parameter. |
POP3-HTMLExportPath | No Equivalent. The Pro plug-in does not export the HTML Body like the Classic plug-in. See the POP3-CurrHTMLExport function for more information. |
POP3-MoveStatus | Use POP3it_StatusWindow with the parameter "Move" as the "Action" parameter, and the desired position coordinates as the "Left" and "Top" parameters. |
POP3-OpenConnection | POP3it_Adv_Connect. Note, the POP3-OpenConnection function was removed in the Classic POP3it v3.0 plug-in and renamed POP3-Connect. The POP3-OpenConnection function does not work with POP3it Pro's backward compatibility option. |
POP3-Password | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "Password" as the "OptionName" parameter. |
POP3-PathToDB | Use POP3it_File_GetPath with the parameter "Database". |
POP3-Port | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "Port" as the "OptionName" parameter. |
POP3-Register | POP3it_Register |
POP3-ShowStatus | Use POP3it_StatusWindow with the parameter "Show". |
POP3-UnDeleteAll | POP3it_Adv_UndeleteAll |
POP3-Username | This value is set for each account using the Account Configuration Dialog (POP3it_ConfigureAccount) or with the POP3it_Adv_SetAccountOption function using "Username" as the "OptionName" parameter. |
POP3-Version | POP3it_Version or POP3it_VersionAutoUpdate |