Golang net/mail.ParseAddressList() function example

package net/mail

Golang net/mail.ParseAddressList() function usage example

 package main

 import (
 "fmt"
 "net/mail"
 )

 var emailAddresses = "abc@abc.com, def@def.com, ghi@ghi.com"

 func main() {
  fmt.Println(mail.ParseAddressList(emailAddresses))
 }

Output :

[<abc@abc.com> <def@def.com> <ghi@ghi.com>] <nil>

Reference :

http://golang.org/pkg/net/mail/#ParseAddressList

Advertisement