Rev 15490 | Rev 15502 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15490 | Rev 15491 | ||
---|---|---|---|
Line 1757... | Line 1757... | ||
1757 | if(*p==0) return; |
1757 | if(*p==0) return; |
1758 | 1758 | ||
1759 | subject=strchr(from,'\n'); if(subject==NULL) return; |
1759 | subject=strchr(from,'\n'); if(subject==NULL) return; |
1760 | // delimitate the 'from' string. |
1760 | // delimitate the 'from' string. |
1761 | *subject++=0; from=find_word_start(from); |
1761 | *subject++=0; from=find_word_start(from); |
1762 | - | ||
- | 1762 | if(*from!=0) snprintf(buf,sizeof(buf),"From:%s\n",from); |
|
- | 1763 | else buf[0]=0; |
|
1763 | body=strchr(subject,'\n'); if(body==NULL) return; |
1764 | body=strchr(subject,'\n'); if(body==NULL) return; |
1764 | // // delimitate the 'subject' string. |
1765 | // // delimitate the 'subject' string. |
1765 | *body++=0; subject=find_word_start(subject); |
1766 | *body++=0; subject=find_word_start(subject); |
1766 | // delimitate the 'body' string. |
- | |
1767 | body=find_word_start(body); |
- | |
1768 | 1767 | ||
1769 | for(pp=subject;*pp;pp++) if(*pp=='"' || *pp=='\n') *pp=' '; |
1768 | for(pp=subject;*pp;pp++) if(*pp=='"' || *pp=='\n') *pp=' '; |
1770 | 1769 | ||
1771 | charset=getvar("wims_main_font");if(charset==NULL) charset="windows-1252"; |
1770 | charset=getvar("wims_main_font");if(charset==NULL) charset="windows-1252"; |
1772 | - | ||
1773 | if(*from!=0){ |
- | |
1774 | snprintf(buf,sizeof(buf),"From:%s\n",from); |
- | |
1775 | } else buf[0]=0; |
- | |
1776 | - | ||
1777 | snprintf(mail_content,sizeof(mail_content), |
1771 | snprintf(mail_content,sizeof(mail_content), |
1778 | "To:%s\n%sSubject:%s\nContent-Type: text/html;charset=\"%s\"\n\n%s\n",p,buf,subject,charset,body); |
1772 | "To:%s\n%sSubject:%s\nContent-Type: text/html;charset=\"%s\"\n\n%s\n",p,buf,subject,charset,body); |
1779 | 1773 | ||
1780 | accessfile(mail_content,"w","%s/mail.eml",tmp_dir); |
1774 | accessfile(mail_content,"w","%s/mail.eml",tmp_dir); |
1781 | wrapexec=1; |
1775 | wrapexec=1; |