Plain text emails with links that have parameters, get 'borked' in Mail.send() if html body included too.

11 views
Skip to first unread message

Eric Dykstra

unread,
Aug 11, 2014, 1:38:31 PM8/11/14
to sil...@googlegroups.com
Hey Mike,

I am using Mail.send for body text that has a link in it like this:


If I am only sending a text email, this block of code works fine.

    if (this.text && !this.html && !this.attachments.length) {
        putln('Content-type: text/plain');
        putln('');
        putln(this.text);
    }

But, if an html body is also specified, this is the block that gets executed:

    if (this.text) {
        putln('--' + boundary);
        putln('Content-Type: text/plain');
        putln('Content-Transfer-Encoding: quoted-printable');
        putln('');
        putln(this.text);
        putln('');
    }

The link in the email then looks like:

www.MyDomain.com/rpc?method¬counts.validate&key‡j4t7wh79rj3lsrikeezujrzr5k5lsj

Notice the '=Ac' was replaced with the 'not sign' which has a hexcode of \xAC and an escape of %AC so that must be related.

Something similar happens on the key=value section, but since the value changes all the time, so does the resulting syntax.

I suspect that the line with 'quoted-printable' is causing the issue. Is that needed because it is now a MIME email given the text and html body?

Currently, my 'work-around' is to only send a text email. Is there something I can do to still send both text and html without the link getting 'borked'?

Thanks,

Eric


Donald Organ

unread,
Aug 11, 2014, 3:17:47 PM8/11/14
to sil...@googlegroups.com
Are you sure that its SilkJS that is causing this, as plain text emails do not have clickable links, and its the email client that creates the clickable link.


--
You received this message because you are subscribed to the Google Groups "SilkJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silkjs+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages