-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Gmail * Gmail 2 * Gmail * Gmail * fix * smtp
- Loading branch information
1 parent
e3edf49
commit 089a17d
Showing
12 changed files
with
146 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
modules/javamail/src/main/scala/emil/javamail/internal/AccessGimapImpl.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package emil.javamail.internal | ||
|
||
import cats.effect.{Blocker, ContextShift, Sync} | ||
import com.sun.mail.gimap.{GmailFolder, GmailStore} | ||
import emil.javamail.internal.BlockingSyntax._ | ||
import emil.javamail.internal.ops.{MoveMail, SearchMails} | ||
import emil.{AccessImap, MailHeader, MailOp} | ||
import jakarta.mail.Transport | ||
|
||
class AccessGimapImpl[F[_]: Sync: ContextShift](blocker: Blocker) | ||
extends AccessImapImpl[F](blocker) | ||
with AccessImap[F, JavaMailConnectionGeneric[GmailStore, Transport, GmailFolder]] { | ||
|
||
def getGmailLabels(mh: MailHeader): MailOp[ | ||
F, | ||
JavaMailConnectionGeneric[GmailStore, Transport, GmailFolder], | ||
Set[GmailLabel] | ||
] = | ||
SearchMails.getGmailLabels(mh).blockOn(blocker) | ||
|
||
def setGmailLabels( | ||
mh: MailHeader, | ||
labels: Set[GmailLabel], | ||
set: Boolean | ||
): MailOp[ | ||
F, | ||
JavaMailConnectionGeneric[GmailStore, Transport, GmailFolder], | ||
Unit | ||
] = | ||
MoveMail.setGmailLabels(mh, labels, set).blockOn(blocker) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
modules/javamail/src/main/scala/emil/javamail/internal/GmailLabel.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package emil.javamail.internal | ||
|
||
case class GmailLabel(value: String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters