To use this package put var Email github.com/David-Billingsley/EasyEmailTemplate
After this is in function you can call the functions by doing Email.Email_Body_Only()
This library is being developed to help make it easier to send emails using go.
This libary is under devlopment if there is a send method you would like, please add it into the issue tracker.
This function generates an email with body only using the email template file provided.
Parms: (Name - Data type - Definition)
- Sender - String - Who is sending the email
- Password - String - Senders Password
- SmtpAdd - string - Senders email SMTP address
- smtpHost - string - Senders email SMTP host
- smtpPort - string - Senders email SMTP Port
- templname - string - the .html template file to use for the email body.
- receivers - []string - the list of receivers
- subject - string - the subject of the email
- bodytext - string - the text you would like passed to the body
Returns: String or Error
Example:
Send email with an attachment
Parms:
(Name - Data type - Definition)
- Sender - String - Who is sending the email
- Password - String - Senders Password
- SmtpAdd - string - Senders email SMTP address
- smtpHost - string - Senders email SMTP host
- smtpPort - string - Senders email SMTP Port
- receivers - []string - the list of receivers
- subject - string - the subject of the email
- bodytext - string - the text you would like passed to the body
- attachmentPath - string - the path of the file you would like to attach
Returns: String or Error