# WIPlib 5.40 / Pop3 delete mail

**URL:** <https://forum.sierrawireless.com/t/wiplib-5-40-pop3-delete-mail/4903>\
**Category:** Open AT\
**Created:** [February 18, 2011, 8:19pm UTC](https://forum.sierrawireless.com/t/wiplib-5-40-pop3-delete-mail/4903 "2011-02-18T20:19:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![semhoun](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@semhoun](https://forum.sierrawireless.com/u/semhoun)\
**Post date:** [February 18, 2011, 8:19pm UTC](https://forum.sierrawireless.com/t/wiplib-5-40-pop3-delete-mail/4903/1 "2011-02-18T20:19:45Z")

</div>

I try to use the POP3 Client API for reading and deleting mail.  
I can read all my mail. But I can’t delete mail.  
I use this line to remove a mail:

```auto
wip_deleteFile(l_pop3Ctx.CnxChannel, MailIdStr);
```

I well receive WIP\_CEV\_DONE after the wip\_deleteFile call, but the mail is not removed.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![ljweko](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@ljweko](https://forum.sierrawireless.com/u/ljweko)\
**Post date:** [February 19, 2011, 3:57pm UTC](https://forum.sierrawireless.com/t/wiplib-5-40-pop3-delete-mail/4903/2 "2011-02-19T15:57:22Z")

</div>

I am using POP3 client within Lua and delete function is working correctly.

The C interface to Lua is using the same function wip\_deleteFile(). I wrote this interface long ago, but looking into the code following may be a hint. After reading email and closing the DATA channel, the program idles 1 second and only then issues the command to delete the email. This timeout may enable DATA channel to close properly. This was tested on Ethernet (GPRS may require more time) and on WipLib 5.30.

You may also enable WIP\_NET\_DEBUG\_PORT\_UARTx option to trace POP3 progress.

---

<div class="post-metadata">

**Author:** ![semhoun](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@semhoun](https://forum.sierrawireless.com/u/semhoun)\
**Post date:** [February 21, 2011, 10:30am UTC](https://forum.sierrawireless.com/t/wiplib-5-40-pop3-delete-mail/4903/3 "2011-02-21T10:30:42Z")

</div>

It’s right mail was delete when i close the DATA channel.

Thanks for your help.
