-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90e2dad
commit b12efc6
Showing
1 changed file
with
19 additions
and
7 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 |
---|---|---|
|
@@ -26,6 +26,8 @@ RazorSmartMailer returns five List(of String): | |
|
||
Embedded attachments returns the list of attachments embedded in the email body, including any image varients from imaging. | ||
|
||
RazorSmartMailer has one more List(of WebException): ErrorCodes. This list returns any application errors. | ||
|
||
The RazorSmartMailer class has a number of properties you will need to set. Below are the properties and default settings as well as input formats. | ||
|
||
```vbnet | ||
|
@@ -40,8 +42,7 @@ With theMailer | |
.PreMailerCss = False ' To Move CSS styles inline with Premailer.Net set True. | ||
.AddHTMLBasePath = False ' When True writes base path into the html document <head>, the quickest way to fix relative links. | ||
.ParsePaths = False ' Parse HTML with regular expression and make relative links absolute. | ||
.ErrorCodes = Nothing ' Returns any application errors. | ||
|
||
|
||
'SMTP Server properites for System.Net.Mail | ||
.SmtpUsername = "" | ||
.SmtpPassword = "" | ||
|
@@ -82,14 +83,14 @@ With theMailer | |
.CropPosition = "center-middle" | ||
|
||
'Watermark | ||
.WatermarkMask = "" | ||
.WatermarkMask = "" ' Add path to watermark mask to enable watermarks. | ||
.WatermarkPadding = 10 | ||
.WatermarkOpacity = 50 | ||
.WatermarkSizes = "128, 128" | ||
.WatermarkAlign = "Center-Middle" | ||
|
||
'Captions | ||
.CaptionText = "" | ||
.CaptionText = "" ' Add text to enable captions. | ||
.CaptionFont = "Ariel" | ||
.CaptionFontSizes = "16" | ||
.CaptionFontColor = "Black" | ||
|
@@ -131,14 +132,14 @@ With theMailer | |
.CropPosition = "Center-Middle" | ||
|
||
'Watermark | ||
.WatermarkMask = "" ' Adding a path to a Watermark mask enables watermarks. | ||
.WatermarkMask = "" ' Add path to a Watermark mask to enable watermarks. | ||
.WatermarkPadding = 10 | ||
.WatermarkOpacity = 50 | ||
.WatermarkSizes = "128, 128" | ||
.WatermarkAlign = "Center-Middle" | ||
|
||
'Captions | ||
.CaptionText = "" Adding text enables captions. | ||
.CaptionText = "" Add text to enable captions. | ||
.CaptionFont = "Ariel" | ||
.CaptionFontSizes = "16" | ||
.CaptionFontColor = "Black" | ||
|
@@ -158,12 +159,23 @@ End With | |
|
||
### Construct `RazorSmartMailer` Instance | ||
Using RazorSmartMailer is very straightforward. True there are many properties the user can define, but only a few the user must define. Most have default values you're unlikely to change. | ||
|
||
To send an HTML templated email, you'll need | ||
```vbnet | ||
Dim theMailer As New RazorSmartMailer | ||
With theMailer | ||
.MailTemplatePath = "~/mailtemplates/mailtemplate.vbhtml" | ||
.SuccessRedirect = "~/thanks.vbhtml" | ||
|
||
'RazorSmartMailer sendmail properties | ||
.EmailFrom = "[email protected]" ' | ||
.EmailRecipient = "[email protected]" | ||
.EMailSubject = "Your Email Subject" | ||
SendWebMail() | ||
End With | ||
``` | ||
We suggest you start setting only the properties required then tweak the defaults until the desired effect is produced. | ||
### Options | ||
|
||
Crop, Watermark, and Caption methods all use the same 9 point location scheme. It is comprised of 3 horizontal and 3 vertical positions resulting in 9 permutations. | ||
|
||
Horizontal positions: Left Center Right. | ||
|