mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-05-28 05:41:28 +00:00
POP65/SMTP65: Fixed bug when :nnn
port number is used in EMAIL.CFG
This commit is contained in:
parent
79eadb3981
commit
7a548df618
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#define PROGNAME "emai//er v1.10"
|
||||
#define PROGNAME "emai//er v1.11"
|
||||
|
||||
// Configuration params from EMAIL.CFG
|
||||
char cfg_server[40]; // IP of POP3 server
|
||||
|
|
|
@ -310,11 +310,13 @@ void readconfigfile(void) {
|
|||
fscanf(fp, "%s", cfg_emaildir);
|
||||
fclose(fp);
|
||||
|
||||
colon = strchr(cfg_smtp_server, ':');
|
||||
colon = strchr(cfg_server, ':');
|
||||
if (!colon)
|
||||
pop_port = 110;
|
||||
else
|
||||
else {
|
||||
pop_port = atoi(colon + 1);
|
||||
*colon = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -350,8 +350,10 @@ void readconfigfile(void) {
|
|||
colon = strchr(cfg_smtp_server, ':');
|
||||
if (!colon)
|
||||
smtp_port = 25;
|
||||
else
|
||||
else {
|
||||
smtp_port = atoi(colon + 1);
|
||||
*colon = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user