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

✨ Enhance the Communications code snippets #335

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

yashksaini-coder
Copy link
Contributor

Fixes: #327

This pull request includes significant updates to the send_email function, its documentation, and related tests. The changes enhance error handling, logging, and input validation, and also update the tests to reflect these improvements.

Enhancements to send_email function:

  • Added logging for better error tracking and information (pysnippets/Communication/send_email.py).
  • Introduced input validation to ensure all required parameters are provided (pysnippets/Communication/send_email.py).
  • Replaced print statements with logging for consistent error and success messages (pysnippets/Communication/send_email.py).

Documentation updates:

  • Corrected the spelling of "recipient" in the function parameters and documentation (pysnippets/Communication/communication.md). [1] [2]
  • Added content_type parameter to allow sending emails in plain text or HTML format (pysnippets/Communication/communication.md). [1] [2]

Test updates:

  • Rewrote tests to align with the updated send_email function, including tests for successful email sending, authentication errors, connection errors, and missing parameters (Tests/Communication/test_send_email.py).

@UTSAVS26 can you review this PR, and add proper labels to it

Copy link
Contributor

github-actions bot commented Nov 4, 2024

👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly!

Feel free to join our community on Discord to discuss more!

@github-actions github-actions bot requested a review from UTSAVS26 November 4, 2024 20:36
@UTSAVS26 UTSAVS26 merged commit 2205bcb into UTSAVS26:main Nov 5, 2024
2 of 6 checks passed
@yashksaini-coder yashksaini-coder deleted the yash/fix-327 branch November 5, 2024 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Enhance the Communications code snippets
2 participants