# smtp problem

**URL:** <https://forums.digi.com/t/smtp-problem/8828>\
**Category:** Rabbit\
**Created:** [September 23, 2007, 8:18pm UTC](https://forums.digi.com/t/smtp-problem/8828 "2007-09-23T20:18:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kim](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@Kim](https://forums.digi.com/u/Kim)\
**Post date:** [September 23, 2007, 8:18pm UTC](https://forums.digi.com/t/smtp-problem/8828/1 "2007-09-23T20:18:25Z")

</div>

Hello,  
I am trying to modify smtp.c to send an email message each time an input is detected on a 3700 module. The first email gets sent but after that there is an error opening port when I try to send a second email. When I turn on SMTP\_VERBOSE it says that the connection is closing after the first email is sent. It is my understanding that the sock must close before it can be used again so I’m not sure what the problem is.

---

<div class="post-metadata">

**Author:** ![lslarry861](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@lslarry861](https://forums.digi.com/u/lslarry861)\
**Post date:** [October 23, 2007, 5:57pm UTC](https://forums.digi.com/t/smtp-problem/8828/2 "2007-10-23T17:57:34Z")

</div>

Are you doing something like this after sending the message:

```
        while(smtp_mailtick()==SMTP_PENDING)
            ;

```
