0

I am using nodemailer to send a HTML email with an anchor in the body. When I receive the email in Thunderbird, the email looks fine, the link is highlighted and underlined as a link, but clicking on it does nothing, the link does not open. When I try to copy the Link location I do not get the link location.

Looking at the Message Source, the link is wrapped in hex.

The link displayed in the console:

    192.168.1.91:8000:8000/?ra=0

The body of the email:

    Return-Path: <xxx@gmail.com>
    Received: from [127.0.0.1] (host86-142-207-54.range86-142.btcentralplus.com. [86.142.207.54]) by smtp.gmail.com with ESMTPSA id v82sm3970454wmv.12.2016.01.09.06.26.50
    for <xxx@gmail.com> (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jan 2016 06:26:50 -0800 (PST) 
    Content-Type: text/html
    From: xxx@gmail.com
    To: xxx@gmail.com
    Subject: Authorisation required
    X-Mailer: nodemailer (1.10.0; +http://www.nodemailer.com; SMTP/1.0.4[client:1.3.6])
    Content-Transfer-Encoding: quoted-printable
    Date: Sat, 09 Jan 2016 14:26:50 +0000
    Message-Id: <1452349610887-6ade706c-d63c6769-932eb97c@gmail.com>
    MIME-Version: 1.0

    <html><body><strong>Simon Platten</strong> has submitted a <a  href=3D'http://192.168.1.91:8000:8000/?ra=3D0'>timesheet</a> for your review and approval.</body></html>

3D is the hex code for '=' but I why are these in the message? Also the 3D after 'ra=' is before the 0 and 0 is the parameter value.

SPlatten
  • 5,334
  • 11
  • 57
  • 128
  • 1
    The reason is the `Content-Transfer-Encoding: quoted-printable`, see [What's a 3D doing in this HTML?](http://stackoverflow.com/questions/4016067/whats-a-3d-doing-in-this-html) for more details. – t.niese Jan 09 '16 at 14:41
  • Thank you I will look into this, does this also explain why the link isn't working? – SPlatten Jan 09 '16 at 15:00
  • 1
    Oh sorry, forgot to write the part of the link. The url is invalid: you have the port (`:8000`) twice in the url (`192.168.1.91:8000:8000`). Fix this and check if it will work then. – t.niese Jan 09 '16 at 15:02
  • Yep, just spoked this myself, missed it the first time around, now testing with this fixed. – SPlatten Jan 09 '16 at 15:10
  • Doh! yes that was the problem... – SPlatten Jan 09 '16 at 15:11

1 Answers1

0

In my post the address had two lots of port ':8000' being applied, I missed this and this was the root of the problem, removing the second port resolved the issue.

SPlatten
  • 5,334
  • 11
  • 57
  • 128