email.go 729 B

1234567891011121314151617181920212223242526272829
  1. //Email is designed to be a package providing an "email interface for humans."
  2. //Designed to be robust and flexible, the email package aims to make sending email easy without getting in the way.
  3. package email
  4. import (
  5. "net/mail"
  6. )
  7. //Email is the type used for email messages
  8. type Email struct {
  9. From string
  10. To []string
  11. Bcc []string
  12. Cc []string
  13. Subject []string
  14. Text []byte //Plaintext message (optional)
  15. Html []byte //Html message (optional)
  16. Headers []mail.Header
  17. Attachments []Attachment //Might be a map soon - stay tuned.
  18. }
  19. //Send an email using the given host and SMTP auth (optional)
  20. func (e Email) Send() {
  21. }
  22. type Attachment struct {
  23. Filename string
  24. }