We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28fa7b6 commit 04c96deCopy full SHA for 04c96de
1 file changed
win32/sendmail.c
@@ -782,12 +782,7 @@ return 0;
782
}
783
784
/* 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
- */
+ unsigned long server_addr = GetAddr(PW32G(mail_host));
791
792
portnum = (short) INI_INT("smtp_port");
793
if (!portnum) {
@@ -797,7 +792,7 @@ return 0;
797
/* Connect to server */
798
sock_in.sin_family = AF_INET;
799
794
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;
801
796
802
if (connect(PW32G(mail_socket), (LPSOCKADDR) & sock_in, sizeof(sock_in))) {
803
closesocket(PW32G(mail_socket));
0 commit comments