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