|
If an
ExampleBy default, <MvPOP> does not remove email messages from the POP3 server. If you want to remove a message, you need to execute an <MvPOPDELETE> tag inside the <MvPOP> loop. This deletes the current email message on the server. The message will still be processed by the application in this iteration of the <MvPOP> loop. Make sure you delete the temporary email files periodically or they will continue to accumulate. This example returns and deletes a single message for the email host server, loads and displays the message file. Example:<MvPOP MAILHOST="mail.my_isp.com" LOGIN="my_userid" PASSWORD="pa55w0rd" DIRECTORY="mymail"> <MvPOPDELETE> <MvPOPSTOP> </MvPOP> <p> Subject: <b><MvEVAL EXPR="{messagesubject}"><b><hr> From: <MvEVAL EXPR="{messagesender}"> -- Date: <MvEVAL EXPR="{messagedate}"><br> Reply to: <MvEVAL EXPR="{messagereplyto}"><br> <br> <MvCOMMENT> Display the message and delete the file. </MvCOMMENT> <MvASSIGN NAME="g.size" VALUE="{ file_read(messagebody, 'data', g.message) }"> <MvEVAL EXPR="{ g.message }"> <MvASSIGN NAME="g.ok" VALUE="{ fdelete(messagebody) }"> </p> |