async-smtpmail-send-it emails not showing up in "Sent Items" view

5 views
Skip to first unread message

Ben Swift

unread,
Oct 15, 2017, 7:08:38 PM10/15/17
to mu-discuss
Hi everyone

I have a scripting workflow which sends a bunch of emails using
`async-smtpmail-send-it` from `smtpmail-async.el`, which works well.

However, these emails don't show up in mu4e's "Sent Items" view (and I
can't seem to find them through the mu4e, even using search).

Any ideas? I realise this might not be a mu4e issue. Alternately, is
there a mu4e-specific function I can use to send email programmatically?

mu --version 0.9.19
mu4e-mu-version 0.9.19
mbsync --version isync 1.3.0

Cheers,
Ben

Eduardo Mercovich

unread,
Oct 17, 2017, 12:44:23 PM10/17/17
to mu-di...@googlegroups.com
Hello Ben.

> I have a scripting workflow which sends a bunch of emails using
> `async-smtpmail-send-it` from `smtpmail-async.el`, which works
> well.
> However, these emails don't show up in mu4e's "Sent Items" view
> (and I can't seem to find them through the mu4e, even using
> search). Any ideas? I realise this might not be a mu4e issue.

Sorry the question but, did the recipients received those mails?
I'm asking to be sure that those mails really were sent out and
are not waiting in some queue.

> Alternately, is there a mu4e-specific function I can use to send
> email programmatically?

A few threads ago we discussed a similar issue, asyncronous send,
and found a couple recipes that -if that's what you are searching
for- may be useful... :)
It'l my fault that is was sent out without subject, so please
search for the thread with Thorsten, me and the term "mstpqueue".

Best regards.


--
Eduardo Mercovich

Donde se cruzan tus talentos
con las necesidades del mundo,
ahí está tu vocación.
(Anónimo)

Ben Swift

unread,
Oct 17, 2017, 5:22:22 PM10/17/17
to mu-di...@googlegroups.com
Hi Eduardo

>> I have a scripting workflow which sends a bunch of emails using
>> `async-smtpmail-send-it` from `smtpmail-async.el`, which works well.
>> However, these emails don't show up in mu4e's "Sent Items" view (and I can't
>> seem to find them through the mu4e, even using search). Any ideas? I realise
>> this might not be a mu4e issue.
>
> Sorry the question but, did the recipients received those mails? I'm asking to
> be sure that those mails really were sent out and are not waiting in some queue.

Yep, I've received replies to the emails :)
>
>> Alternately, is there a mu4e-specific function I can use to send email
>> programmatically?
>
> A few threads ago we discussed a similar issue, asyncronous send, and found a
> couple recipes that -if that's what you are searching for- may be useful... :)
> It'l my fault that is was sent out without subject, so please search for the
> thread with Thorsten, me and the term "mstpqueue".

Ok, will do, thanks.

Cheers,
Ben

Eduardo Mercovich

unread,
Oct 17, 2017, 6:15:19 PM10/17/17
to mu-di...@googlegroups.com
Hi Ben.

[...]

>> Sorry the question but, did the recipients received those
>> mails? I'm asking to be sure that those mails really were sent
>> out and are not waiting in some queue.

> Yep, I've received replies to the emails :)
[...]

Great.

Did you grep'ped those mails? Are they in the maildir but are not
indexed somehow, or they are not there?
Maybe this can help us to diagnose where the problem is...

Ben Swift

unread,
Oct 17, 2017, 11:07:08 PM10/17/17
to mu-di...@googlegroups.com
Hi Eduardo

Thanks for your reply.

>>> Sorry the question but, did the recipients received those mails? I'm asking
>>> to be sure that those mails really were sent out and are not waiting in some
>>> queue.
>
>> Yep, I've received replies to the emails :)
> [...]
>
> Great.
>
> Did you grep'ped those mails? Are they in the maildir but are not indexed
> somehow, or they are not there? Maybe this can help us to diagnose where the
> problem is...

No, grepping shows that like they're in the maildir anywhere. Where
should they be getting copied to the maildir?

Here's the exact function I'm using (apologies for the hacky-ness). It
basically "fakes" the creation of the email in a mu4e-compose-mode
buffer, and then sends it off.

```elisp
(defun ben-send-email (email-address subject body &optional cc-string)
(with-temp-buffer
(mu4e-context-switch nil "ben")
(insert (format "From: Ben Swift <b...@benswift.me>\nTo: %s\n%sSubject: %s\n--text follows this line--\n%s"
email-address
(if cc-string (format "Cc: %s\n" cc-string) "")
subject
body))
(async-smtpmail-send-it)))
```

Cheers,
Ben

Eduardo Mercovich <eduardo....@gmail.com> writes:

> Hi Ben.
>
> [...]

Eduardo Mercovich

unread,
Oct 18, 2017, 7:57:39 AM10/18/17
to mu-di...@googlegroups.com
Hi Ben.

[...]

>> Did you grep'ped those mails? Are they in the maildir but are
>> not indexed somehow, or they are not there? Maybe this can help
>> us to diagnose where the problem is...

> No, grepping shows that like they're in the maildir anywhere.
> Where should they be getting copied to the maildir?

Sorry but I don't understand if they are or not there... <:)

In any case, they should be where you configured your
mu4e-sent-folder. If they are not in that place, there is a
configuration issue.

If they are there (in any place inside your maildir, really), they
should be indexed by mu.

> Here's the exact function I'm using (apologies for the
> hacky-ness). [...]

Sorry, I don't know elisp yet, I can't appreciate it's
hakcy-ness... (but hope to do so in the future). ;)

Ben Swift

unread,
Oct 18, 2017, 5:35:19 PM10/18/17
to mu-di...@googlegroups.com
Hi Eduardo

>>> Did you grep'ped those mails? Are they in the maildir but are not indexed
>>> somehow, or they are not there? Maybe this can help us to diagnose where the
>>> problem is...
>
>> No, grepping shows that like they're in the maildir anywhere. Where should
>> they be getting copied to the maildir?
>
> Sorry but I don't understand if they are or not there... <:)

Whoops - my brain seems to have exploded somewhere in the middle of
writing that sentence. Sorry about that.

What I meant was "they're not in the maildir anywhere".

> In any case, they should be where you configured your mu4e-sent-folder. If they
> are not in that place, there is a configuration issue.
>
> If they are there (in any place inside your maildir, really), they should be
> indexed by mu.

Ok, I'll have a look. Thanks again.

Cheers
Ben
Reply all
Reply to author
Forward
0 new messages