Mutt not sending email when specifying smtp server

muttsmtp

I am trying to use mutt as my email client, and it works fine for my gmail account. But when I use my work email, it does not send the emails. It doesn't give any error, it just doesn't send them. The line in my .muttrc file that causes this problem is:

set smtp_url = "smtp://mail.my_work_email_server.com:587"

The behaviour does not change when adding the smtp_pass, nor does it by altering the name of the email server (i.e. using a 'fictional' server address).

Best Answer

I had the same thing and this is what worked for me.

set ssl_starttls=yes
set ssl_force_tls=yes

set imap_user = "user@example.com"
set imap_pass = "!HASHEDPASSWORD!"
set folder = imap://mail.example.com/
set spoolfile = imap://mail.example.com/INBOX

# SMTP user auth
# # fill in the right user and pass based on your setup
# # protocols: smtp for TLS (25/587), smtps for SSL (465)
set smtp_url = "smtp://$imap_user@mail.example.com:587"
set smtp_pass = "$imap_pass"

# Where to save copies of outgoing mail
set record = '+Sent'

What made it NOT work for me was the order in which things were in the config file and a definition for 'set record' to a folder which was a link to a non existing folder.

When answering 'no' to the question of creating the Folder it was hanging and no traffic was seen towards the SMTP server.

PS: check sourced config files, they might specify conflicting settings and/or in the wrong order.

HTH

Related Question