summaryrefslogtreecommitdiff
path: root/notifier
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-05-11 10:19:47 -0700
committerGitHub <noreply@github.com>2018-05-11 10:19:47 -0700
commit8127ebd190a26ff859c47b01020ac00ffdefe0d7 (patch)
treeb1a0352921969b6bcf44f1cfa08e426397f16c0b /notifier
parente5fee178d99b73b15f487df779c80a71646aacbf (diff)
parent077bd665bdd881c33b3086541365e36b4c733d57 (diff)
downloadcups-8127ebd190a26ff859c47b01020ac00ffdefe0d7.tar.gz
Merge pull request #5312 from hansmi/mailtowait1
mailto: Wait for server opening message
Diffstat (limited to 'notifier')
-rw-r--r--notifier/mailto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/notifier/mailto.c b/notifier/mailto.c
index a05addf62..9b3aeccab 100644
--- a/notifier/mailto.c
+++ b/notifier/mailto.c
@@ -248,6 +248,10 @@ email_message(const char *to, /* I - Recipient of message */
fprintf(stderr, "DEBUG: Connected to \"%s\"...\n", mailtoSMTPServer);
+ if (!cupsFileGets(fp, response, sizeof(response)) || atoi(response) >= 500)
+ goto smtp_error;
+ fprintf(stderr, "DEBUG: <<< %s\n", response);
+
cupsFilePrintf(fp, "HELO %s\r\n",
httpGetHostname(NULL, hostbuf, sizeof(hostbuf)));
fprintf(stderr, "DEBUG: >>> HELO %s\n", hostbuf);