mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 05:40:50 +01:00
Fixed example code
This commit is contained in:
parent
81cf2e646c
commit
c41301e26b
1 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
|||
package mail
|
||||
package mail_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/wneessen/go-mail"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
@ -10,7 +11,7 @@ func ExampleClient_DialAndSend() {
|
|||
to := "Alice <alice@example.com>"
|
||||
server := "mail.example.com"
|
||||
|
||||
m := NewMsg()
|
||||
m := mail.NewMsg()
|
||||
if err := m.From(from); err != nil {
|
||||
fmt.Printf("failed to set FROM address: %s", err)
|
||||
os.Exit(1)
|
||||
|
@ -21,7 +22,7 @@ func ExampleClient_DialAndSend() {
|
|||
}
|
||||
m.Subject("This is a great subject")
|
||||
|
||||
c, err := NewClient(server)
|
||||
c, err := mail.NewClient(server)
|
||||
if err != nil {
|
||||
fmt.Printf("failed to create mail client: %s", err)
|
||||
os.Exit(1)
|
||||
|
|
Loading…
Reference in a new issue