Skip to content

Commit 04c96de

Browse files
committed
win32/sendmail.c/MailConnect(): remove outdated comment
1 parent 28fa7b6 commit 04c96de

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

win32/sendmail.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff 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));

0 commit comments

Comments
 (0)