Code Monkey home page Code Monkey logo

Comments (5)

pennersr avatar pennersr commented on June 5, 2024 1

The TLS support has landed on master, and this should fix from encoding: cd866cc

from shove.

pennersr avatar pennersr commented on June 5, 2024

I would prefer not to use that NewEmailFromReader method, because I think that the underlying code has a simplified view of an email and is possibly unable to handle complex digested emails consisting of multiple parts. Also, it may be worthwhile to swap that package out in favour of another one, so I think it is good to introduce a local method capable of sending mails by TLS.

Can you have a look at commit c3c814f in branch feat-email-tls -- does that cover your needs?

from shove.

seeya avatar seeya commented on June 5, 2024

Hi, thanks for creating the branch. I've tested the code and it works if the "from" value is just an email. I think the Subject is also missing from the email.

Doersn't work with from value "Test [email protected]"

{
    "digest": {
        "subject": "Hello Digest"
    },
    "subject": "TEST SUBJECT",
    "from": "Test <[email protected]>",
    "to": ["[email protected]"],
    "text": "This is a text email",
    "html": "<!DOCTYPE html>\n<html=\"en\">\n<body>\n<p><b>This is a html message FROM GOLANG!</b></p>\n</body>"

}

Works

{
    "digest": {
        "subject": "Hello Digest"
    },
    "subject": "TEST SUBJECT",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "text": "This is a text email",
    "html": "<!DOCTYPE html>\n<html=\"en\">\n<body>\n<p><b>This is a html message FROM GOLANG!</b></p>\n</body>"
}

from shove.

pennersr avatar pennersr commented on June 5, 2024

I doubt there is an issue with respect to the subject -- this service is in production and subjects work just fine over there. As for the from, I'll have a look...

from shove.

seeya avatar seeya commented on June 5, 2024

Appreciate the TLS support. Tested on my side and it works flawlessly!

from shove.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.