--- parser3/src/classes/mail.C 2016/04/01 16:27:31 1.128 +++ parser3/src/classes/mail.C 2016/11/01 23:10:40 1.131 @@ -19,7 +19,7 @@ #include "smtp.h" -volatile const char * IDENT_MAIL_C="$Id: mail.C,v 1.128 2016/04/01 16:27:31 moko Exp $"; +volatile const char * IDENT_MAIL_C="$Id: mail.C,v 1.131 2016/11/01 23:10:40 moko Exp $"; // defines @@ -98,7 +98,7 @@ static void sendmail( // win32 without SMTP server configured throw Exception(PARSER_RUNTIME, 0, - "$"MAIN_CLASS_NAME":"MAIL_NAME".SMTP not defined"); + "$" MAIN_CLASS_NAME ":" MAIL_NAME ".SMTP not defined"); #else // unix // $MAIN:MAIL.sendmail["/usr/sbin/sendmail -t -i -f postmaster"] default @@ -149,9 +149,8 @@ static void sendmail( if(after_file_spec==STRING_NOT_FOUND || after_file_spec==0) file_spec=sendmail_command; else { - size_t pos_after=after_file_spec; - file_spec=&sendmail_command->mid(0, pos_after++); - sendmail_command->split(argv, pos_after, " ", String::L_AS_IS); + file_spec=&sendmail_command->mid(0, after_file_spec); + sendmail_command->split(argv, after_file_spec+1, " ", String::L_AS_IS); } if(!file_executable(*file_spec)) @@ -220,7 +219,7 @@ static void _send(Request& r, MethodPara smtp_server_port?true:false /*send by SMTP=strip to?*/, to); if(print_debug) - r.write_pass_lang(message); + r.write(message); else sendmail(vmail_conf, smtp_server_port, message, from, to, soptions); }