From b12efc68035ac58a6d509280b4a4aa5392ea22fd Mon Sep 17 00:00:00 2001 From: James Threadgill Date: Tue, 18 Jul 2017 20:14:31 -0500 Subject: [PATCH] Add files via upload --- README.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 349c7f6..acf7180 100644 --- a/README.md +++ b/README.md @@ -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 , 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 = "web@razorsmartmailer.com" ' + .EmailRecipient = "user@razorsmartmailer.com" + .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.