public class Mail {
public void sendEmailWithCsvFile(String from, String to, String subject,
String body, List<String> csvFileLines) {
StringBuffer buffer = new StringBuffer();
for (String line : csvFileLines)
buffer.append(line + quot;nquot;);
Properties props = new Properties();
props.put(quot;mail.smtp.hostquot;, quot;localhostquot;);
MailService mailService = new MailService(props);
mailService.newMessage()
.from(from)
.to(to)
.subject(subject)
.body(body)
.attachTextFile(quot;file3.csvquot;, buffer.toString())
.send();
}
}
send_email do
to 'pcalcado@gmail.com'
from 'bemaia@fragmental.tw'
subject 'Testing via Ruby'
body %{
Hi,
Please do not forget the milk.
Bye!
}
attachment('file4.csv') << lines
end
I want this CSV E-mail
report delivered
as an e-mail
Attachment
attachment
Noise
the difference between
I want this CSV E-mail
report delivered
as an e-mail
Attachment
attachment
Noise
the difference between
I want this CSV E-mail
report delivered
This
as an e-mail
Attachment
attachment
Noise
the difference between
I want this CSV E-mail
report delivered
This That
as an e-mail
Attachment
attachment
Noise
the difference between
Business Analysis Design Implementation
public class Something{
Class Name Class Name
Attribute Attribute
Attribute Attribute
private String name;
Operation Operation
Operation Operation
public boolean doS(){
}
Class Name
Attribute
}
Attribute
Operation
Operation
This That
“Idiomatic”: Focus on how to use
technical tools to solve the
problem in an efficient way.
Domain-Driven: Language is only a
tool to model the domain.
Internal DSL: Language is only an
:internal {
extensible tool to model the
DSL
domain.
}
External DSL: Language is created
based on the domain.
“Idiomatic”: TFocus on how to use
DO: a
O e
e d r n am
technical toolsr thato solve the
Ne te
be t t
fo
problem in an efficient way.
Domain-Driven: Language is only a
tool to model the domain.
Internal DSL: Language is only an
:internal {
extensible tool to model the
DSL
domain.
}
External DSL: Language is created
based on the domain.