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

resend async email. #64

Open
zw963 opened this issue Jun 17, 2016 · 7 comments
Open

resend async email. #64

zw963 opened this issue Jun 17, 2016 · 7 comments

Comments

@zw963
Copy link

zw963 commented Jun 17, 2016

Hi, I use mu4e, and use emacs-async package to sent email.

But, in some case, when I sent, I found the internet is not connect.

In this case, my sent email is moved to Maildir: /sent, But, the email
is not sent out actually.

How to do for this case?

Thanks.

@zw963
Copy link
Author

zw963 commented Jun 17, 2016

See log, I could see:

Sending via mail...
Delivering message to opensuse@opensuse.org...

If internet is available when sent, correct output is:

[mu4e] Message sent
Delivering message to opensuse@opensuse.org...done

Current, my internet is not so stable, is there exist a workaround for this?

thanks

@thierryvolpiatto
Copy link
Collaborator

Billy.Zheng notifications@github.com writes:

See log, I could see:

Sending via mail...
Delivering message to opensuse@opensuse.org...

If internet is available when sent, correct output is:

[mu4e] Message sent
Delivering message to opensuse@opensuse.org...done

Current, my internet is not so stable, is there exist a workaround for this?

If your connection is unstable, you should use by default mu4e in queued
mode, when you are sure you are well connected flush all your queued
mails.

I agree this is a problem but it is hard to fix this only on the async
side, probably we should find a solution both on mu4e and async-smtp.
(i.e telling mu4e the mail have been sent from the async callback)

Thierry

@zw963
Copy link
Author

zw963 commented Jun 21, 2016

I create a issue for mu project too, thanks

My network is not so bad in most case though.

But this case will happen occasionally.

the problem is if this case happen, I hard to do the resend operation.
I have to copy this email content and create a new mail send it again.
I think this operation maybe make mu4e index broken.

It is a very bad experience for me, currently, I prefer to waiting email is sent
and not use async email package. it better ...

@jwiegley
Copy link
Owner

This is definitely a bug. The a sinking on package is supposed to signal an error if the email fails to send, which would leave the buffer in an unsent status.

At the moment, this is just an experimental package to show proof of concept. I would recommend not using it in light of this problem.

@thierryvolpiatto
Copy link
Collaborator

John Wiegley notifications@github.com writes:

This is definitely a bug. The a sinking on package is supposed to
signal an error if the email fails to send, which would leave the
buffer in an unsent status.

This is too late, when the error is sent (if it was) mu4e or whatever mua have moved
the email to sent recipient, it is why I said we have to find a fix in
both packages (probably around the message-sent-hook usage).

At the moment, this is just an experimental package to show proof of
concept. I would recommend not using it in light of this problem.

I use it since months, and when used on a valid connection it is safe to
use (this email have been sent async).

Thierry

@thierryvolpiatto
Copy link
Collaborator

You can modify the value of smtpmail-queue-mail automatically when your network is connected or disconnected.
This ensure your mails are queued when network is disconnected.
You can achieve this by installing https://github.com/tromey/emacs-network-manager library and using something like this:

(use-package NetworkManager
    :config
    (NetworkManager-add-listener
     (lambda (state)
       (setq smtpmail-queue-mail (not state))
       (when (eq major-mode 'mu4e-main-mode)
         (let ((pos (point)))
           (mu4e~main-view-real nil nil)
           (goto-char pos))))))

@zw963
Copy link
Author

zw963 commented Feb 18, 2017

@thierryvolpiatto , Cool! I will try it later.

Thanks

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

No branches or pull requests

3 participants