Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/smtp: clearer documentation for SendMail #6625

Closed
gopherbot opened this issue Oct 19, 2013 · 7 comments
Closed

net/smtp: clearer documentation for SendMail #6625

gopherbot opened this issue Oct 19, 2013 · 7 comments

Comments

@gopherbot
Copy link

by faraazs:

Hello,

This is my first bug report for golang. I tried searching for this issue, but
could not find any issues relating to this problem. Please excuse me if I missed
one.

The documentation for net/smtp.SendMail can be clearer. Specifically, it is not
clear that the msg parameter is included directly within the header section. I
have attached a patch that includes a bit more documentation on the msg
parameter.

Attachments:

  1. smtp.patch (734 bytes)
@gopherbot
Copy link
Author

Comment 1 by faraazs:

Another option for this change would be to extend the net/smtp package to have a similar
API to the net/http package. SMTP and HTTP follow a similar text based protocol. I
haven't studied the code too closely, but the two packages may be able to share some
code.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 4:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added repo-main.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@agnivade
Copy link
Contributor

I believe this can be closed. SendMail documentation now clearly specifies that the msg parameter contains the headers.

  // The msg parameter should be an RFC 822-style email with headers
  // first, a blank line, and then the message body. The lines of msg
  // should be CRLF terminated. The msg headers should usually include
  // fields such as "From", "To", "Subject", and "Cc".  Sending "Bcc"
  // messages is accomplished by including an email address in the to
  // parameter but not including it in the msg headers.

@bradfitz
Copy link
Contributor

@agnivade, thanks!

@bradfitz bradfitz reopened this Dec 15, 2017
@agnivade
Copy link
Contributor

Oops, you seem to have reopened it again. Mistake ?

@golang golang locked and limited conversation to collaborators Dec 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants