projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.7
[ossec-hids.git]
/
src
/
os_maild
/
sendcustomemail.c
diff --git
a/src/os_maild/sendcustomemail.c
b/src/os_maild/sendcustomemail.c
index
ea2b203
..
a597fcc
100755
(executable)
--- a/
src/os_maild/sendcustomemail.c
+++ b/
src/os_maild/sendcustomemail.c
@@
-1,11
+1,12
@@
-/* @(#) $Id$ */
+/* @(#) $Id: ./src/os_maild/sendcustomemail.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All rights reserved.
*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
/* Copyright (C) 2009 Trend Micro Inc.
* All rights reserved.
*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
- * License (version 2) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
* Foundation
*/
* Foundation
*/
@@
-67,7
+68,7
@@
int OS_SendCustomEmail(char **to, char *subject, char *smtpserver, char *from, F
/* Connecting to the smtp server */
/* Connecting to the smtp server */
- socket = OS_ConnectTCP(SMTP_DEFAULT_PORT, smtpserver);
+ socket = OS_ConnectTCP(SMTP_DEFAULT_PORT, smtpserver, 0);
if(socket < 0)
{
return(socket);
if(socket < 0)
{
return(socket);
@@
-112,7
+113,7
@@
int OS_SendCustomEmail(char **to, char *subject, char *smtpserver, char *from, F
if(msg)
free(msg);
close(socket);
if(msg)
free(msg);
close(socket);
- return(OS_INVALID);
+ return(OS_INVALID);
}
}
else
}
}
else
@@
-209,7
+210,7
@@
int OS_SendCustomEmail(char **to, char *subject, char *smtpserver, char *from, F
{
break;
}
{
break;
}
-
+
memset(snd_msg,'\0',128);
snprintf(snd_msg,127, TO, to[i]);
OS_SendTCP(socket,snd_msg);
memset(snd_msg,'\0',128);
snprintf(snd_msg,127, TO, to[i]);
OS_SendTCP(socket,snd_msg);
@@
-229,7
+230,7
@@
int OS_SendCustomEmail(char **to, char *subject, char *smtpserver, char *from, F
#else
strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %z\r\n",p);
#endif
#else
strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %z\r\n",p);
#endif
-
+
OS_SendTCP(socket,snd_msg);
OS_SendTCP(socket,snd_msg);
@@
-246,7
+247,7
@@
int OS_SendCustomEmail(char **to, char *subject, char *smtpserver, char *from, F
while(fgets(buffer, 2048, fp) != NULL)
{
OS_SendTCP(socket,buffer);
while(fgets(buffer, 2048, fp) != NULL)
{
OS_SendTCP(socket,buffer);
- }
+ }
/* Sending end of data \r\n.\r\n */
/* Sending end of data \r\n.\r\n */