Commit graph

8 commits

Author SHA1 Message Date
0xsaif
aa7ee1c6b9
refactor: force ipv4 localhost (#22394)
* reafctor: force ipv4 localhost

Replacing "localhost" with "127.0.0.1" in the codebase; sometimes the name localhost force-resolves to ipv6

* revert: leave localhost usage in oauth tests

Change not required.

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-13 16:23:23 +05:30
Ankush Menat
3e2d2a703a test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
mtraeber
f608fbeddd feat: sync mutliple IMAP folders in Email Account
When working with IMAP accounts, frappe should allow the user
to choose multiple folders to look for new mails. This helps
users to separate their frappe-related email from other
conversations. Use cases range from sieve filters in the
mail server that stuff incoming mail in various mail folders
to people manually sorting their e-mail. In both cases, we
can have different import policies for different folders, and
we can avoid importing unrelated email.

Created a new child table `IMAP Folder` with following fields:
 - Folder Name (user-modifiable)
 - Append To (user-modifiable)
 - UIDVALIDITY (hidden)
 - UIDNEXT (hidden)

Doctype `Email Account` and `receive.py` code adjusted so that
emails with the changes are processed correctly and Frappe
only logs in to the imap server once per sync.

Created a patch that copies the data from the old fields into
the new child table with `INBOX` as default `folder_name`. This
keeps existing setups working without manual changes.

The original fields
 - uidvalidity
 - uidnext
 - append_to
are still available for the pop3 setups. In IMAP, these fields
are hidden user and not used.

Added a test case in `Email Account` that validates data to make
sure a IMAP folder is provided if the use_imap is true.

Also added some code formatting changes in email_account.js to get rid
of sider checks failures that block this change
2021-10-13 10:27:18 +02:00
leela
59bfc12da6 refactor: Cleaned Email Queue sendmail functionality
* Sending mail works independently
* You can send a mail by calling Queue_doc.send()
* Used context manager to track exceptions while sending mails
2021-05-06 10:08:50 +05:30
leela
a8f74d9471 refactor: Move finding email accounts code to EmailAccount doctype 2021-05-03 06:22:35 +05:30
Mohammad Hasnain Mohsin Rajan
ea2a2772f2
test: which email Id to pick for sending emails (#12550)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-04-15 12:39:15 +05:30
Shivam Mishra
6d9a56e43c feat: add tests 2020-11-25 18:54:03 +05:30