summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-09-21 07:56:09 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-09-21 07:56:09 +0000
commit198df47e5b9a247134b91d3447b764260f50a916 (patch)
treee14341607fca7de76be9abe155c7bd5b4e7a7931 /include
parent7a47e82f67118a6488754dec9a9e3e8f091edaa1 (diff)
downloadzabbix-198df47e5b9a247134b91d3447b764260f50a916.tar.gz
zabbix-198df47e5b9a247134b91d3447b764260f50a916.tar.xz
zabbix-198df47e5b9a247134b91d3447b764260f50a916.zip
Changes in send_email to make it RFC compatible.
git-svn-id: svn://svn.zabbix.com/trunk@508 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
-rw-r--r--include/functions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/functions.c b/include/functions.c
index 5b72ad20..ad94ca2b 100644
--- a/include/functions.c
+++ b/include/functions.c
@@ -352,7 +352,8 @@ int send_email(char *smtp_server,char *smtp_helo,char *smtp_email,char *mailto,c
}
memset(c,0,MAX_STRING_LEN+1);
- sprintf(c,"MAIL FROM: %s\r\n",smtp_email);
+/* sprintf(c,"MAIL FROM: %s\r\n",smtp_email);*/
+ sprintf(c,"MAIL FROM:<%s>\r\n",smtp_email);
e=sendto(s,c,strlen(c),0,(struct sockaddr *)&servaddr_in,sizeof(struct sockaddr_in));
if(e == -1)
{
@@ -428,7 +429,8 @@ int send_email(char *smtp_server,char *smtp_helo,char *smtp_email,char *mailto,c
}
memset(c,0,MAX_STRING_LEN+1);
- sprintf(c,"Subject: %s\r\n%s",mailsubject, mailbody);
+/* sprintf(c,"Subject: %s\r\n%s",mailsubject, mailbody);*/
+ sprintf(c,"From:<%s>\r\nTo:<%s>\r\nSubject: %s\r\n\r\n%s",smtp_email,mailto,mailsubject, mailbody);
e=sendto(s,c,strlen(c),0,(struct sockaddr *)&servaddr_in,sizeof(struct sockaddr_in));
if(e == -1)
{