imap: „Nie można utworzyć wybieralnego gniazda TCP” podczas wysyłania wiadomości e-mail z programu C ++

Próbuję wysłać wiadomość e-mail z programu C ++ za pomocą biblioteki imap. Mam Aplikacje Google i konto Gmail, na które wysyłam e-mail.

Ilekroć program nie wysyła wiadomości e-mail, zapisuję błędy w pliku.

Ustawiłem program, aby działał w pętli, aby wysyłać e-maile. Czasami nie dostaję wiadomości e-mail, a gdy sprawdzałem plik dziennika, stwierdziłem, że błędy te są rejestrowane za każdym razem, gdy wysyłanie wiadomości e-mail nie powiedzie się.

Oto część pliku dziennika:

<code>[2012-04-23 11:04:34]   ErrCode:1 ErrMsg:Unable to create selectable TCP socket (2753 >= 1024)
[2012-04-23 11:04:34]   ErrCode:2 ErrMsg:Unable to create selectable TCP socket (2753 >= 1024)
[2012-04-23 11:05:36]   ErrCode:1 ErrMsg:Unable to create selectable TCP socket (1692 >= 1024)
[2012-04-23 11:05:36]   ErrCode:2 ErrMsg:Unable to create selectable TCP socket (1692 >= 1024)
[2012-04-23 11:07:52]   ErrCode:1 ErrMsg:Unable to create selectable TCP socket (1605 >= 1024)
[2012-04-23 11:07:52]   ErrCode:2 ErrMsg:Unable to create selectable TCP socket (1605 >= 1024)
[2012-04-23 11:08:02]   ErrCode:1 ErrMsg:Unable to create selectable TCP socket (1566 >= 1024)
[2012-04-23 11:08:02]   ErrCode:2 ErrMsg:Unable to create selectable TCP socket (1566 >= 1024)
[2012-04-23 11:08:09]   ErrCode:1 ErrMsg:Unable to create selectable TCP socket (1067 >= 1024)
[2012-04-23 11:08:09]   ErrCode:2 ErrMsg:Unable to create selectable TCP socket (1067 >= 1024)
[2012-04-23 11:08:19]   ErrCode:1 ErrMsg:Unable to create selectable TCP socket (1648 >= 1024)
[2012-04-23 11:08:19]   ErrCode:2 ErrMsg:Unable to create selectable TCP socket (1648 >= 1024)
[2012-04-23 11:08:20]   ErrCode:1 ErrMsg:Unable to create selectable TCP socket (1130 >= 1024)
[2012-04-23 11:08:20]   ErrCode:2 ErrMsg:Unable to create selectable TCP socket (1130 >= 1024)
</code>

Czy jest to związane z portem serwera imap? Jeśli tak, na który port powinien być ustawiony? 993 zawsze? Jak rozwiązać ten błąd?

Oto moje ustawienie:

<code>Name: Ashwin
my email: [email protected]
reply-to-email: [email protected]
</code>

Informacje o serwerze SMTP:

<code>Host: smtp.gmail.com
Encryption: SSL
Port: 465
</code>

Program działa jako użytkownik root, a biblioteka, z której korzystam, pochodzi zhttp://panda.com/imap/

questionAnswers(1)

yourAnswerToTheQuestion