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

[mu4e] Cannot send mail via ssl or starttls #4669

Closed
andreas-h opened this issue Jan 18, 2016 · 2 comments

Comments

@andreas-h
Copy link

@andreas-h andreas-h commented Jan 18, 2016

@TheBB @darkfeline @nwolfe

I cannot figure out how to send emails via SSL/STARTTLS. My configuration is

(setq mu4e-account-alist
  '(("Uni"
     (user-mail-address "me@uni-bremen.de")
     (smtpmail-default-smtp-server "smtp.uni-bremen.de")
     (smtpmail-local-domain "uni-bremen.de")
     (smtpmail-smtp-server "smtp.uni-bremen.de")
     (smtpmail-stream-type "ssl")
     (smtpmail-smtp-service 465))

    ("Private"
     (user-mail-address "me@posteo.de")
     (smtpmail-default-smtp-server "posteo.de")
     (smtpmail-local-domain "posteo.de")
     (smtpmail-smtp-server "posteo.de")
     (smtpmail-stream-type "ssl")
     (smtpmail-smtp-service 465))))
(mu4e/mail-account-reset)

I get the error

open-network-stream: Invalid connection type ssl

When I change

     (smtpmail-stream-type "ssl")

to

     (smtpmail-stream-type 'ssl)

I get the error

open-network-stream: Invalid connection type (quote ssl)

I would appreciate a working config example for sending mails over an encrypted channel to the SMTP server.

@andreas-h

This comment has been minimized.

Copy link
Author

@andreas-h andreas-h commented Jan 18, 2016

Mhh, now it's working, and I cannot see any difference in my config, except that I'm explicitly setting

(setq message-send-mail-function 'smtpmail-send-it)

in init.el.

... sorry for the noise!

@andreas-h andreas-h closed this Jan 18, 2016
@toothbrush

This comment has been minimized.

Copy link

@toothbrush toothbrush commented Jul 13, 2016

In case anyone else is having this issue, i was bitten by it too, and the change that @andreas-h made is actually unrelated (and i don't believe it solved the issue).

The actual problem is that the list of items in mu4e-account-alist is already quoted, so when one writes (smtpmail-stream-type 'ssl), what is actually being stored in smtpmail-stream-type is literally the value 'ssl, while it should simply be ssl. Remove the extraneous quote-mark and all is well. For completeness, in @andreas-h's case, that would become:

(setq mu4e-account-alist
  '(("Private"
     (user-mail-address "me@posteo.de")
     ...
     (smtpmail-stream-type ssl)
     (smtpmail-smtp-service 465))))

Hope that helps somebody else, took me embarrassingly long to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.