Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwebconcepts committed Jul 19, 2017
1 parent 90e2dad commit b12efc6
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = ""
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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.
Expand Down

0 comments on commit b12efc6

Please sign in to comment.