Commit graph

1327 commits

Author SHA1 Message Date
5d79ff69c3
Enhance and clarify Reader struct documentation
Improved documentation for the Reader struct, its methods, and error handling. Added detailed explanations for `Read`, `Error`, `Reset`, and `empty` functions to better describe their parameters, return values, and behavior.
2024-10-06 17:05:04 +02:00
cd90c3ddf3
Update randNum function and documentation for multiple versions
Expanded randNum function comments to provide detailed behavior and usage across different Go versions. Enhanced the randomStringSecure function doc to explain its cryptographic secure implementation and error handling.
2024-10-06 17:00:49 +02:00
e640f2df46
Add detailed comments and return descriptions to Part methods
Enhanced the documentation of `Part` struct and its methods to provide clearer explanations, including parameter and return descriptions. This improves code readability and helps developers understand the functionality and usage of each method.
2024-10-06 16:54:18 +02:00
295155ba67
Refactor and document msgWriter methods
Streamline msgWriter by adding detailed documentation for each method and constant. This includes parameter descriptions, return values, and references to relevant RFCs, improving code readability and maintainability.
2024-10-06 16:42:50 +02:00
0b105048e6
Refine WriteToTempFile docstring
Clarify the documentation for WriteToTempFile to better explain its functionality, ensure consistency, and detail its return values.
2024-10-06 16:21:37 +02:00
3333c784a6
Refactor documentation for Importance methods
Updated the documentation for NumString, XPrioString, and String methods in the Importance type to provide clearer descriptions of their behavior and return values. Enhanced comments for better readability and maintainability of the code.
2024-10-06 16:19:53 +02:00
ac7fa5771a
Refactor documentation and enhance comments
Updated documentation for the `File` struct and its methods, providing clearer explanations and detailed parameter and return descriptions. Improved readability and consistency of comments across the codebase.
2024-10-06 16:16:49 +02:00
dab9cc947a
Improve documentation for String methods
Enhanced comments for String methods on Charset, ContentType, and Encoding types. Detailed the purpose and usage of each method, emphasizing their role in formatted output and logging.
2024-10-06 13:53:20 +02:00
2c1082fe42
Enhance EML parsing function documentation
Added detailed doc comments to EML parsing functions, specifying parameters, return values, and providing thorough explanations of functionalities to improve code understandability and maintainability. This helps future developers and users comprehend the usage and behavior of these functions more effectively.
2024-10-06 13:51:36 +02:00
3e8706d52e
Refactor Send method documentation in client files
Updated the documentation for the Send method in client_119.go and client_120.go to provide clearer explanations, include detailed descriptions of parameters, and specify return values. Ensured consistency across files by elaborating on error handling and connection checks.
2024-10-06 13:41:45 +02:00
756269644e
Update SMTP client documentation with detailed descriptions
Enhance the SMTP client method documentation by adding detailed explanations of the methods' purposes, parameters, return values, and operational flow. This improves clarity, making it easier for developers to understand the functionality and usage of each method.
2024-10-06 13:39:40 +02:00
d6426063ba
Refactor comments and docstrings for clarity and detail
Enhanced comments and docstrings for better readability and detail in client.go and b64linebreaker.go. Updated descriptions, added parameter and return details, and included RFC references where applicable for improved documentation quality.
2024-10-06 12:39:02 +02:00
b4197a136e
Enhance documentation for message methods
Expanded docstrings for methods in msg.go to provide detailed explanations, parameters, and return values. This improves clarity and helps developers understand usage and behavior more effectively.
2024-10-06 12:04:27 +02:00
01278ccb30
Document message methods
Added detailed comments to various methods in `msg.go` for clarity. Each method now includes a declaration, a detailed description, returned values, parameters, and relevant RFC references. This enhances code readability and maintainability.
2024-10-06 00:49:09 +02:00
eafb9cb17e
Add detailed parameter and return descriptions to msg.go
Enhanced function documentation by adding detailed descriptions of parameters and return values for various methods. This clarifies expected inputs and outputs, improving code readability and maintainability.
2024-10-06 00:25:15 +02:00
864c593208
Add parameters and references to method comments in msg.go
Enhanced method documentation by adding parameter descriptions and reference links. This improves the clarity and usability of the code, ensuring that users understand the purpose and usage of each method.
2024-10-05 20:29:33 +02:00
4890d9130b
Expand docstrings for MsgOption functions and methods.
This commit enhances the docstrings for the MsgOption functions and related methods in msg.go, providing extensive explanations, parameters, and references. It helps users understand the functionality, usage, and context of each function, improving code readability and usability.
2024-10-05 20:06:51 +02:00
b37f8995da
Update Msg documentation for clarity and RFC compliance
Enhanced the documentation for several Msg methods to provide clearer explanations and include relevant RFC references. This includes improved descriptions of functionality, parameter details, return values, and links to pertinent RFC sections.
2024-10-05 19:34:37 +02:00
c520925457
Enhance documentation for email address methods
Detailed doc comments have been added to various methods handling "From", "To", "CC", "BCC", and "Reply-To" email addresses within the Msg class. The new comments follow RFC 5322 standards and provide explicit descriptions of the functionality and validation rules for each method. This improves code readability and maintainability. Additionally, moved the `addAddr` function to a more appropriate position within the file.
2024-10-05 19:11:16 +02:00
3d5435c138
Update EnvelopeFromFormat documentation in msg.go
Expanded the documentation for the EnvelopeFromFormat method to clarify its purpose, usage, and compliance with RFC 5322. Added details on how the envelope from address is used in SMTP communication and validation requirements.
2024-10-05 13:59:24 +02:00
1dcdad9da1
Enhance address header methods with detailed documentation
Updated comments in `header.go` and `msg.go` to provide more detailed explanations and references to RFC 5322. This improves clarity on how headers are set and utilized, and the conditions under which they operate.
2024-10-05 13:56:47 +02:00
78e2857782
Update method comments to include additional context and RFC references
Enhanced the comments for various methods in `msg.go`, `client.go`, `auth.go`, and `encoding.go` to provide more detailed explanations, context, and relevant RFC references. This improves the clarity and maintainability of the code by providing developers with a deeper understanding of each method's purpose and usage.
2024-10-05 13:39:21 +02:00
c186cba2c2
Refactor MsgOption comments for clarity
Revised the comments for MsgOption functions to provide clearer explanations of their purpose and usage. Added detailed descriptions for options such as WithMIMEVersion and WithBoundary to clarify their contexts and constraints.
2024-10-05 12:48:09 +02:00
682f7a6ca5
Clarify Msg struct field comments
Updated comments for all fields in the Msg struct to provide clearer and more detailed explanations. This includes specifying the data type for each field and the role they play within the Msg struct, making the code easier to understand and maintain.
2024-10-05 12:35:15 +02:00
cd4c0194dc
Refactor comments for clarity and detail
Enhanced the descriptive comments for error variables, constants, and types to provide clearer and more detailed explanations. This improves code readability and ensures that the purpose and usage of different elements are better understood by developers.
2024-10-05 12:15:01 +02:00
a820ba3cee
Correct typo in README.md
Fixed a typo in the README where `io.WriteTo` was incorrectly spelled instead of `io.WriterTo`. This ensures the documentation correctly reflects the interfaces implemented by the Message object.
2024-10-05 12:14:00 +02:00
96466facdd
Refactor and document header types and importance levels.
Updated type declarations for headers and importance to clarify their roles in the Msg package. Added detailed inline comments and RFC links for better documentation and understanding. Enhanced string representation methods to explicitly handle importance levels and header types.
2024-10-05 12:00:10 +02:00
493f8fc657
Add periods to charset comments
Updated the comment lines for various charset constants to include ending periods for consistency and better readability. This change enhances code documentation quality without altering any functional behavior.
2024-10-05 11:54:37 +02:00
94f47d4369
Update crypto and text libraries
Upgraded golang.org/x/crypto to v0.28.0 and golang.org/x/text to v0.19.0. These updates improve security and compatibility with recent changes in Go modules. Ensure to run `go mod tidy` to clean up any unused dependencies.
2024-10-05 11:47:15 +02:00
476130d6e3
Fumpt files to make golangci-lint happy 2024-10-05 11:43:50 +02:00
a0a7f74121
Refactor file.go comments for clarity and detail
Improved comments for better readability and understanding. Enhanced descriptions for File, FileOption, and various methods, providing more context and precision. Added notes on default behaviors and specific use cases for methods where applicable.
2024-10-05 11:42:21 +02:00
ecd0bff5ad
Update comments for better clarity and add RFC references
Revised the comments to provide more detailed descriptions and context for each type and constant. Additionally, included relevant RFC document references where applicable to improve understanding of encoding and MIME types.
2024-10-05 11:23:44 +02:00
5653df373b
Add periods to end of go doc comments
Ensure all go doc comments in eml.go have consistent punctuation by adding periods to the end of each comment. This improves code readability and maintains uniformity in the documentation style.
2024-10-05 11:11:17 +02:00
869e8db6c5
Improve package documentation and description
Expand the package mail description to highlight ease of use, reliance on the Go Standard Library, and added functionalities. Clarify the role of VERSION in the user agent string.
2024-10-05 11:06:46 +02:00
fa3c6f956e
Update Send function documentation for better clarity
Enhanced the documentation of the `Send` function to explicitly describe the behavior when the Client has no active connection and the handling of multiple message transmissions. This ensures developers understand the error handling mechanism and the association of `SendError` with each message.
2024-10-05 11:02:26 +02:00
159c1bf850
Add tests for new tls and connection handling methods
This commit introduces tests for various TLS-related methods such as GetTLSConnectionState, HasConnection, SetDSNMailReturnOption, SetDSNRcptNotifyOption, and UpdateDeadline. It also modifies the error handling logic in smtp.go to include new error types and improves the mutex handling in UpdateDeadline.
2024-10-05 10:55:25 +02:00
9163943684
Add isConnected flag to track active connection state
Introduced the isConnected boolean flag in the Client struct to clearly indicate whether there is an active connection. Updated relevant methods to set this flag accordingly, ensuring consistent state management across the Client's lifecycle.
2024-10-05 10:15:43 +02:00
fbbf17acd0
Refactor comments for clarity in client.go
Simplify comments in `client.go` to improve code documentation. Ensure comments are more descriptive and provide context for the functions they describe, enhancing code readability and maintainability.
2024-10-04 23:25:43 +02:00
48b469faf7
Refactor SMTP client comment and function documentation
Updated function comments across client.go to improve clarity and consistency. Added missing details on error handling and context usage for `DialAndSendWithContext` and ensured all functions contain relevant, detailed descriptions.
2024-10-04 23:23:16 +02:00
adcb8ac41d
Fix connection handling and improve thread-safety in SMTP client
Reset connections to nil after Close, add RLock in HasConnection, and refine Close logic to handle already closed connections gracefully. Enhanced DialWithContext documentation and added tests for double-close scenarios to ensure robustness.
2024-10-04 23:15:01 +02:00
dfdadc5da2
Refactor client.go: Move functions to new locations
Reordered several functions within client.go for better code organization and readability. This change involves moving `setDefaultHelo`, `checkConn`, `serverFallbackAddr`, and `tls` functions to new locations without altering their implementations.
2024-10-04 22:38:18 +02:00
8942b08424
Add validation for custom SMTP auth type in client tests
Previously, only the presence of the SMTP auth method was checked, but not its type. This additional validation ensures that the SMTP auth type is correctly set to custom, thereby improving test accuracy.
2024-10-04 22:36:28 +02:00
972a3c51c7
Add custom SMTP authentication type support
Introduce the SMTPAuthCustom type to represent user-defined SMTP authentication mechanisms. Updated relevant functions in client.go to handle the new type appropriately and made sure the client distinguishes between built-in and custom authentication methods.
2024-10-04 22:33:42 +02:00
d900f5403e
Refine method documentation in client.go
Correct typos and enhance clarity in method descriptions. Provide additional context for default values and behavior, and specify consequences for security settings in client configurations.
2024-10-04 22:23:18 +02:00
eeaee3f60a
Update and expand documentation for client configuration options
Revised comments provide clearer guidance on the usage of various client configuration functions. Additional details and external references are included for better understanding and error handling.
2024-10-04 21:57:38 +02:00
bae0ac6cde
Refactor TLS policy comments for clarity
Updated comments for WithTLSPolicy and WithTLSPortPolicy to provide clearer explanations. Improved readability and emphasized recommended best practices for SMTP TLS connections.
2024-10-04 21:45:12 +02:00
3e5c93a418
Refine and clarify SSL and debug logging comments
Revised the comments for `WithSSLPort`, `WithDebugLog`, `WithLogger`, and `WithHELO` options to improve readability and provide clearer explanations. Added caution about potential data protection issues when using debug logging and specified defaults where applicable.
2024-10-04 21:38:39 +02:00
a34f400a05
Improve client option documentation for clarity and validation
Enhanced the documentation for NewClient and related option functions to provide clearer descriptions. Added validation details for WithPort and WithTimeout, and improved explanations for SSL/TLS settings.
2024-10-04 21:26:29 +02:00
779a3f3942
Refactor error comments for clarity
Updated error comments to provide clearer and more descriptive explanations. Enhanced readability by elaborating on the conditions that result in each error, giving developers better context. No functional changes to the code were made.
2024-10-04 21:12:05 +02:00
6cd3cfd2f7
Refactor comments for clarity and consistency
Rephrase comments to enhance clarity and maintain consistent style. Improved explanations for fields such as `smtpAuth`, `helo`, and `noNoop`, and standardize grammar and format across all comments. This helps in better understanding the code and its functionality.
2024-10-04 20:57:51 +02:00