Subject: bug#59587: 28.2; gnus does not retrieve emails sent from another device

From: Eric Abrahamsen <[email-masked]>
Date: Tue, 06 Dec 2022 16:10:29 -0800

Waleed Yousef <[email-masked]> writes:

> One more piece of clue: I installed outlook on my iphone to experiment with, as a replacement of “Mail app” of iphone. The same problem exist, i.e., when I send an email with outlook, gnus does not fetch it. 

Can you confirm that the Outlook app saves your sent message in the app?
What's the name of the folder the send mail is saved to?

My guess is that the account in question is the one you're using as an
imap mail source. When you use imap as a mail source, Gnus will only
fetch mails from the folders named in the :mailbox setting, which
defaults to "INBOX". So I'm guessing that the mail is being saved into
"Sent" or something like that, but Gnus does not fetch mail from there.

If it's true that this is the imap account, then try changing the
mail-source definition to:

(imap :server "mail.uvic.ca"
      :user "[email-masked]"
      :port 993
      :stream ssl
      :mailbox ("INBOX" "Sent")
      )

Replacing "Sent" with whatever the actual name of the sent mail folder
is.

Alternately (and in my mind preferably), access the imap account using a
full nnimap server backend. Then you'll see everything, and get two-way
sync.

Eric

>> On Dec 1, 2022, at 9:16 AM, Waleed Yousef <[email-masked]> wrote:
>> 
>> 
>> Thanks again for your time,
>> 
>> I have four emails, three are pop3 and one is imap. I am using nnml. This is my gnus.el part:
>> 
>> ```
>> (setq mail-sources `(
>>                         (pop :server "pop.gmail.com"
>>                                :user "[email-masked]"
>>                                :port 995
>>                                :stream ssl)
>>                         (pop :server "pop.gmail.com"
>>                                :user "[email-masked]"
>>                                :port 995
>>                                :stream ssl)
>>                         (pop :server "pop.gmail.com"
>>                                :user "[email-masked]"
>>                                :port 995
>>                                :stream ssl)
>>                         (imap :server "mail.uvic.ca"
>>                                 :user "[email-masked]"
>>                                 :port 993
>>                                 :stream ssl
>>                                )
>>                         )
>>      gnus-select-method '(nntp "news.gnus.org")
>>      gnus-secondary-select-methods '((nnml ""))
>> 
>>      user-mail-address "[email-masked]"
>>      user-full-name "Waleed Yousef"
>>      send-mail-function        'smtpmail-send-it
>>      message-send-mail-function    'smtpmail-send-it
>>      smtpmail-smtp-server        "smtp.gmail.com"
>>      smtpmail-smtp-service             '587
>> )
>> ```
>> 
>> Another piece of information is that I am using spacemacs, which I do not think it will make any difference as its maintainers confirmed to me that they did not change anything with gnus
>> 
>> 
>> Thanks so much.
>> 
>> Eric Abrahamsen <[email-masked]> writes:
>> 
>>> Waleed Yousef <[email-masked]> writes:
>>> 
>>>> Thanks so much for your reply. After I read your reply, I did several
>>>> experiments and found that the problem does not happen (that is, Gnus
>>>> pulls the sent messages) if I send from the webmail interface of a
>>>> pop3 email, e.g., using chrome to send from my gmail account. In that
>>>> case Gnus will pull the sent email. However, if the email is sent from
>>>> my iphone (whether IMAP or pop3 account) or even from a webmail
>>>> interface of an IMAP account, Gnus does not pull the sent email
>>>> although the email is indeed saved in the sent box (I go online and
>>>> check).
>>> 
>>> This still isn't enough information to help you. How is Gnus fetching
>>> mail for this account? Is it an nnimap backend, or some other mail
>>> backend using a mail source?