Code Monkey home page Code Monkey logo

Comments (5)

Supme avatar Supme commented on July 20, 2024

Use https://pkg.go.dev/mime and https://pkg.go.dev/mime/multipart

from smtpd.

samrocks1011 avatar samrocks1011 commented on July 20, 2024

@Supme I have used the above library to Print the MIME and send mail but at the end some characters are missing and give Missing Boundary Error.

Screenshot_218

from smtpd.

Supme avatar Supme commented on July 20, 2024

The beginning of the content should start "--"+boundary
The end of the content should end "--"+boundary+"--"
Example

from smtpd.

samrocks1011 avatar samrocks1011 commented on July 20, 2024

@Supme I am using postfix content_filter to pass the mail to smtpd.go library. After Parsing the data and applying the policy I use SendMail function to send the mail to the recipient. When sending using sendMail ( Converting String to bytes), the data is sent with missing boundary or just skip the HTML part before the missing boundary.
I have not modified any core library of the code so i do not know want is causing this issue.

from smtpd.

samrocks1011 avatar samrocks1011 commented on July 20, 2024

@Supme The issue is resolved. I looped the mail twice in the Send trigger, due to which the function AddReceivedLine was called twice. AddReceivedLine function is used to add "Received: from" in the header. After I rectify the issue and now the mail is going perfectly after the policy is applied.

from smtpd.

Related Issues (5)

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.