|
@@ -26,20 +26,20 @@ Plans for the ```email``` package currently include supporting:
|
|
|
#### Sending email using Gmail
|
|
|
```
|
|
|
e := NewEmail()
|
|
|
- e.From = "Jordan Wright <test@gmail.com>"
|
|
|
- e.To = []string{"test@example.com"}
|
|
|
- e.Bcc = []string{"test_bcc@example.com"}
|
|
|
- e.Cc = []string{"test_cc@example.com"}
|
|
|
- e.Subject = "Awesome Subject"
|
|
|
- e.Text = "Text Body is, of course, supported!"
|
|
|
- e.Html = "<h1>Fancy Html is supported, too!</h1>"
|
|
|
- e.Send("smtp.gmail.com:587", smtp.PlainAuth("", e.From, "password123", "smtp.gmail.com"))
|
|
|
+e.From = "Jordan Wright <test@gmail.com>"
|
|
|
+e.To = []string{"test@example.com"}
|
|
|
+e.Bcc = []string{"test_bcc@example.com"}
|
|
|
+e.Cc = []string{"test_cc@example.com"}
|
|
|
+e.Subject = "Awesome Subject"
|
|
|
+e.Text = "Text Body is, of course, supported!"
|
|
|
+e.Html = "<h1>Fancy Html is supported, too!</h1>"
|
|
|
+e.Send("smtp.gmail.com:587", smtp.PlainAuth("", e.From, "password123", "smtp.gmail.com"))
|
|
|
```
|
|
|
|
|
|
#### Attaching a File
|
|
|
```
|
|
|
e := NewEmail()
|
|
|
-e.Attach('test.txt')
|
|
|
+e.Attach("test.txt")
|
|
|
```
|
|
|
|
|
|
### Documentation
|