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

feat: Support for non-attachment mails #6370

Merged
merged 1 commit into from Aug 16, 2019

Conversation

mrsaicharan1
Copy link
Member

@mrsaicharan1 mrsaicharan1 commented Aug 16, 2019

Fixes #6047
Fixes #6327

Short description of what this resolves:

This PR aims to enable the mail task to send emails even when attachments are blocked by the mail server.

Changes proposed in this pull request:

  • Added logic to erase the mail attachments when gmail (or) other mail providers don't allow them.

@auto-label auto-label bot added the feature label Aug 16, 2019
@mrsaicharan1 mrsaicharan1 changed the title feat: Supports sending non-attachment mails feat: Support for non-attachment mails Aug 16, 2019
@mrsaicharan1
Copy link
Member Author

@uds5501 @iamareebjamal This is ready for a review

@codecov
Copy link

codecov bot commented Aug 16, 2019

Codecov Report

Merging #6370 into development will decrease coverage by 0.03%.
The diff coverage is 4.76%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #6370      +/-   ##
===============================================
- Coverage        65.33%   65.29%   -0.04%     
===============================================
  Files              287      287              
  Lines            14765    14775      +10     
===============================================
+ Hits              9646     9647       +1     
- Misses            5119     5128       +9
Impacted Files Coverage Δ
app/api/helpers/tasks.py 17.36% <4.76%> (-0.2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79ff3e5...7ec0c36. Read the comment docs.

message.attach(name=attachment)
mailer.send(message)
logging.info('Message sent via SMTP')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Shifted logic to outer try..except

Supported for SMTP protocol
Copy link
Contributor

@uds5501 uds5501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mails should be sent even though attachments are being blocked Mails with attachment are blocked by gmail
4 participants