forked from smsohan/MvcMailer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MvcMailMessage with new Populate method. Fix dependencies. Fix gi…
…tignore.
- Loading branch information
1 parent
d567843
commit 0a94129
Showing
125 changed files
with
67,650 additions
and
21,228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,20 @@ | ||
|
||
Scaffold Mailer InvitationMailer InviteFriend | ||
# vs | ||
|
||
build | ||
*.csproj.user | ||
*ReSharper* | ||
*resharper* | ||
*.suo | ||
*.user | ||
*.bak | ||
*.sln.cache | ||
|
||
<smtp from="mvcmailer@smsohan.com"> | ||
<network enableSsl="true" host="smtp.gmail.com" port="587" userName="mvcmailer@smsohan.com" password="mvcmailer" /> | ||
</smtp> | ||
|
||
|
||
public virtual MailMessage InviteFriend(Invitation invitation) | ||
{ | ||
var mailMessage = new MailMessage{Subject = "Invitation from TravelTo"}; | ||
|
||
mailMessage.To.Add(invitation.FriendEmail); | ||
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 /> | ||
<i>@ViewBag.Invitation.InvitationMessage</i> | ||
|
||
<br /> | ||
|
||
@Url.Abs(Url.Action("Index", "Home")) | ||
|
||
using TravelTo.Mailers; | ||
using Mvc.Mailer; | ||
|
||
new InvitationMailer().InviteFriend(invitation).Send(); | ||
# other | ||
*.bak | ||
*.cache | ||
*.log | ||
*.swp | ||
*.user | ||
* Thumbs.db | ||
*.bin | ||
Autotest.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Oops, something went wrong.