File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -782,12 +782,7 @@ return 0;
782782 }
783783
784784 /* Resolve the servers IP */
785- /*
786- if (!isdigit(PW32G(mail_host)[0])||!gethostbyname(PW32G(mail_host)))
787- {
788- return (FAILED_TO_RESOLVE_HOST);
789- }
790- */
785+ unsigned long server_addr = GetAddr (PW32G (mail_host ));
791786
792787 portnum = (short ) INI_INT ("smtp_port" );
793788 if (!portnum ) {
@@ -797,7 +792,7 @@ return 0;
797792 /* Connect to server */
798793 sock_in .sin_family = AF_INET ;
799794 sock_in .sin_port = htons (portnum );
800- sock_in .sin_addr .S_un .S_addr = GetAddr ( PW32G ( mail_host )) ;
795+ sock_in .sin_addr .S_un .S_addr = server_addr ;
801796
802797 if (connect (PW32G (mail_socket ), (LPSOCKADDR ) & sock_in , sizeof (sock_in ))) {
803798 closesocket (PW32G (mail_socket ));
You can’t perform that action at this time.
0 commit comments