fix mailto parsing
This commit is contained in:
parent
67923707ff
commit
7bc556740a
1 changed files with 5 additions and 1 deletions
|
@ -500,7 +500,11 @@ func (aerc *Aerc) Mailto(addr *url.URL) error {
|
||||||
|
|
||||||
var subject string
|
var subject string
|
||||||
h := &mail.Header{}
|
h := &mail.Header{}
|
||||||
h.SetAddressList("to", []*mail.Address{&mail.Address{Address: addr.Opaque}})
|
to, err := mail.ParseAddressList(addr.Opaque)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("Could not parse to: %v", err)
|
||||||
|
}
|
||||||
|
h.SetAddressList("to", to)
|
||||||
for key, vals := range addr.Query() {
|
for key, vals := range addr.Query() {
|
||||||
switch strings.ToLower(key) {
|
switch strings.ToLower(key) {
|
||||||
case "cc":
|
case "cc":
|
||||||
|
|
Loading…
Reference in a new issue