Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

v0 gopkg release doesn't generate messages properly #29

Open
DanielOaks opened this issue Jul 21, 2016 · 1 comment
Open

v0 gopkg release doesn't generate messages properly #29

DanielOaks opened this issue Jul 21, 2016 · 1 comment

Comments

@DanielOaks
Copy link

DanielOaks commented Jul 21, 2016

It looks like the v0 gopkg release recommended in the readme doesn't generate messages properly. It might be best to just suggest using the Github directly or possibly updating the gopkg v0 release instead?

Cool library by the way, thanks to you and the contributors for publishing it :)

@DanielOaks
Copy link
Author

DanielOaks commented Jul 22, 2016

Oh, I think I might see what's going on. It's an intermittent issue so it doesn't always show up.

writeHeader looks like it isn't retrieving the headers in the correct order here, so it's outputting a message like the following:

 Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary=a796d952ceeb72f2d67d664a27d5e6671935ae240753bc5bac5b9ba290e3
To: <[email protected]>
From: <[email protected]>
Subject: message subject here

--a796d952ceeb72f2d67d664a27d5e6671935ae240753bc5bac5b9ba290e3
Content-Type: multipart/alternative;
 boundary=fb81b69ff86c807cb14b35f7e154cecda8e9cff180e89feac42b0f97acc6

--fb81b69ff86c807cb14b35f7e154cecda8e9cff180e89feac42b0f97acc6
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Text message body here.
--fb81b69ff86c807cb14b35f7e154cecda8e9cff180e89feac42b0f97acc6--

--a796d952ceeb72f2d67d664a27d5e6671935ae240753bc5bac5b9ba290e3--

When this happens, it's retrieving the headers in this order:

HEADER key: Mime-Version
HEADER key: Content-Type
HEADER key: To
HEADER key: From
HEADER key: Subject
HEADER key: Content-Type

Which makes Google tell me "555 5.5.2 Syntax error."

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant