2
* Copyright 2016 Software Freedom Conservancy Inc.
3
* Copyright 2019 Michael Gratton <mike@vee.net>
5
* This software is licensed under the GNU Lesser General Public License
6
* (version 2.1 or later). See the COPYING file in this distribution.
9
private class Geary.ImapEngine.YahooAccount : Geary.ImapEngine.GenericAccount {
12
public static void setup_account(AccountInformation account) {
16
public static void setup_service(ServiceInformation service) {
17
switch (service.protocol) {
19
service.host = "imap.mail.yahoo.com";
20
service.port = Imap.IMAP_TLS_PORT;
21
service.transport_security = TlsNegotiationMethod.TRANSPORT;
25
service.host = "smtp.mail.yahoo.com";
26
service.port = Smtp.SUBMISSION_TLS_PORT;
27
service.transport_security = TlsNegotiationMethod.TRANSPORT;
33
public YahooAccount(AccountInformation config,
35
Endpoint incoming_remote,
36
Endpoint outgoing_remote) {
37
base(config, local, incoming_remote, outgoing_remote);
40
protected override MinimalFolder new_folder(ImapDB.Folder local_folder) {
41
FolderPath path = local_folder.get_path();
42
SpecialFolderType type;
43
if (Imap.MailboxSpecifier.folder_path_is_inbox(path)) {
44
type = SpecialFolderType.INBOX;
46
// Despite Yahoo not advertising that it supports
47
// SPECIAL-USE via its CAPABILITIES, it lists the
48
// appropriate attributes in LIST results anyway, so we
49
// can just consult that. :|
50
type = local_folder.get_properties().attrs.get_special_folder_type();
51
// There can be only one Inbox
52
if (type == SpecialFolderType.INBOX) {
53
type = SpecialFolderType.NONE;
57
return new YahooFolder(this, local_folder, type);