Better EMAIL.message computing.
Send end of input file for stdin mode.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
note
|
||||
description : "[
|
||||
Component representing an email
|
||||
Email message handled by notification mailer.
|
||||
]"
|
||||
author : "$Author: jfiat $"
|
||||
date : "$Date: 2015-06-30 11:07:17 +0200 (mar., 30 juin 2015) $"
|
||||
revision : "$Revision: 97586 $"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
NOTIFICATION_EMAIL
|
||||
@@ -193,13 +192,21 @@ feature -- Reset
|
||||
feature -- Conversion
|
||||
|
||||
message: STRING_8
|
||||
local
|
||||
l_content: like content
|
||||
do
|
||||
Result := header
|
||||
Result.append_character ('%N')
|
||||
Result.append (content)
|
||||
l_content := content
|
||||
if l_content.is_empty then
|
||||
Result.append_character ('%N')
|
||||
else
|
||||
Result.append (l_content)
|
||||
if l_content[l_content.count] /= '%N' then
|
||||
Result.append_character ('%N')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
header: STRING_8
|
||||
local
|
||||
|
||||
@@ -3,7 +3,6 @@ note
|
||||
Component responsible to send email using an external mailer
|
||||
i.e: an external tool such as sendmail or a script, ...
|
||||
]"
|
||||
author: "$Author$"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -103,6 +102,7 @@ feature -- Basic operation
|
||||
if attached stdin_termination_sequence as v then
|
||||
p.put_string (v)
|
||||
end
|
||||
p.put_string ("%N") -- End Of Input file.
|
||||
end
|
||||
else
|
||||
if attached arguments as l_args then
|
||||
|
||||
Reference in New Issue
Block a user