Výprava na horu Rocca byla krásným celodenním výletem - v této oblasti jsou hned čtyři feraty:
- F.Susati,
- M.Foletti
- Sent.dei Camminamenti
- Sent.delle Lasta
@* Generator: Template *@
@functions{
public string Recipient { get; set; }
public string Sender { get; set; }
public string Content { get; set; }
}
@{ Layout = new emailLayout();}
<img alt="Logo" src="cid:logo" />
<table width="550" class="headerText">
<tr><td>Hello Mr.@Recipient</td></tr>
<tr><td>This is my message for you: @Content</td></tr>
<tr><td>Regards, @Sender</td></tr>
</table>
@* Generator: Template *@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <style type="text/css"> body { font-family: "Lucida Grande","Helvetica Neue",sans-serif; font-size: 12px; color: #333333; background: White; } </style> </head> <body> @RenderBody() </body> </html>
MailMessage mail = new MailMessage(); var htmlContent = (new email { Sender = "Martin", Recipient = "John", Content = "You win!!!" }).TransformText().Trim(); var htmlView = AlternateView.CreateAlternateViewFromString(htmlContent, new ContentType("text/html")); mail.AlternateViews.Add(htmlView);
var attachResource = new LinkedResource(new MemoryStream(<byte[]>)); attachResource.ContentId = <resourceID>; htmlView.LinkedResources.Add(attachResource);
Attachment att = new Attachment(new MemoryStream(<byte[]>), attachmentName); mail.Attachments.Add(att);
<system.net>
<mailSettings>
<smtp from="mail@test.com">
<network host="localhost" port="25"/>
</smtp>
</mailSettings>
</system.net>



