Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (22 sloc) 916 Bytes
Scaffold Mailer InvitationMailer InviteFriend
<smtp from="">
<network enableSsl="true" host="" port="587" userName="" password="mvcmailer" />
public virtual MailMessage InviteFriend(Invitation invitation)
var mailMessage = new MailMessage{Subject = "Invitation from TravelTo"};
ViewBag.Invitation = invitation;
PopulateBody(mailMessage, viewName: "InviteFriend");
return mailMessage;
<h1>TravelTo Invitation<h1>
Hi <strong>@ViewBag.Invitation.FriendName:</strong><br />
Your friend @ViewBag.Invitation.Name invited you to TravelTo. He also wrote this message.<br />
<br />
<br />
@Url.Abs(Url.Action("Index", "Home"))
using TravelTo.Mailers;
using Mvc.Mailer;
new InvitationMailer().InviteFriend(invitation).Send();