SMTP Problems with Opera's built-in mail client "M2"

If you're having problems sending mail with Opera's built-in mail client "M2", here are some things you can try.

Check Your SMTP Settings

First off, you have to make sure the settings in Opera are correct for the SMTP server you're trying to use. The correct settings are the ones you'll find listed somewhere on the mail provider's site. If necessary, you'll need to contact your mail provider to get the correct settings.

The correct settings do not necessarily mean the settings that Opera automatically uses when you create an account. When you create a mail account in Opera, the new account wizard uses the info in mailproviders.xml in Opera's program files directory to try to automatically configure the settings based on your email address and therefore, you mail provider. If you're having problems, DO NOT assume that the settings Opera automatically used are correct. Again, find out from your mail provider what settings you should be using.

Also, not only do you have to make sure the settings are correct, you also need to make sure the settings for the account in accounts.ini (in the mail folder, see Help -> About Opera for the location) match what you see in "O-Menu -> Mail and Chat Accounts -> account -> edit".

Check That the SMTP Server Location Is Correct

On the Servers tab in the account's properties, type a bogus location in the SMTP server field. OK out, close "Mail and Chat Accounts" and close Opera. Start Opera back up, enter the correct location for the SMTP server, OK out, close "Mail and Chat Accounts" and close Opera.

Then, check accounts.ini with a text editor. Under the section for the account in question, make sure "Outgoing Servername" is set to the correct location you set in the UI. If it's not, fix it and save your changes.

Check That Your Email Address Is Correct

On the General tab in the account's properties, type a bogus address in the "Mail address" field, OK out, close "Mail and Chat Accounts" and close Opera. Start Opera back up, enter the correct address, OK out, close "Mail and Chat Accounts" and close Opera.

Then, make sure the "Email" value for the account in accounts.ini is set to the correct address.

Check That the Authentication Method Is Correct

On the Servers tab in the account's properties, set the SMTP authentication method to something different than it's currently set to, OK out, close "Mail and Chat Accounts" and close Opera. Start Opera back up, set the authentication method to "Auto", OK out, close "Mail and Chat Accounts" and close Opera.

Then, make sure the "Outgoing Authentication Method" value for the account in accounts.ini is set to 31.

Note that Opera doesn't support SASL External
Authentication. Most other clients don't either. So, if you have an smtp server set up like that, it won't work with Opera.

Make Sure the Port and TLS Settings Are Correct

On the Servers tab in the account's properties, set the SMTP port to 555, OK out, close "Mail and Chat Accounts" and close Opera.

Then, start Opera back up and set the SMTP port to the proper port.

There are only a few common situations for the port, so you can try them all if you don't know the correct port number.

Unsecure connections:

Port 25 with TLS unchecked.
Port 587 with TLS unchecked.

Secure connections using StartTLS?:

Port 25 with TLS checked.
Port 587 with TLS checked.

Direct TLS secure connection:

Port 465 with TLS checked.

It all depends on what ports the SMTP server supports, whether StartTLS? and or DirectTLS? are supported and whether or not your ISP blocks port 25.

Once you set the port and the TLS checkbox to what you want, OK out, close "Mail and Chat Accounts' and close Opera.

Then, make sure that the "Outgoing Port" value for the account in accounts.ini is set to the correct number. Also, make sure "Secure Connection Out" is set to 1 if TLS for SMTP was enabled before closing Opera or 0 if it was not.

Note that if you want to use a Direct TLS connection on an smtp port other than 465, it won't work. It also won't work if you want to use StartTLS? on port 465.

Check That Your Username and Password Are Correct

On the Servers tab in the account's properties, type bogus values in the username and password fields for the SMTP server, OK out, close "Mail and Chat Accounts" and close Opera. Start Opera back up, enter the correct username and password, OK out, close "Mail and Chat Accounts" and close Opera.

Then, make sure the "Outgoing Username" value for the account in accounts.ini is set to the correct value.

Remember to find out whether your username should be "user" or "username@example.com".

Also, if you still believe that Opera's not using the password you entered, close down Opera and delete wand.dat in Opera's preferences folder (see Help -> About Opera for the location). You'll lose all your passwords including site passwords, but you'll rule out wand.dat corruption. You'll especially might want to do this if you're using a Master Password as something could be messed up. In that case, in addition to deleting wand.dat, delete opcert6.dat. Then, you'll have to set up your Master Password again.

Check That Messages Are Not Queued

On the Outgoing tab in the account's properties, make sure "Queue messages (don't send immediately)" is not checked, OK out, close "Mail and Chat Accounts" and close Opera.

Then, make sure the "Queue Outgoing" value for the account in accounts.ini is set to 0.

Turn Off Your Anti-Virus's Mail Scanner

If your anti-virus software has an email scanner, try turning it off.

For example, Avast's email scanner is known to interfere with Thunderbird and Opera and usually affects Hotmail users more than others.

Further, check your whole computer for viruses, spyware, malware, browser hijackers, key loggers and rootkits etc.

Also, consider that your anti-virus, anti-spyware and anti-malware programs themselves just being enabled could be causing a problem.

Also, consider somethings as simple as a network analyzer program could be causing a problem.

Turn Off TLS 1.1 and TLS 1.2

Some email servers have a bug where they'll tell Opera that they support TLS 1.1 and TLS 1.2 even though they do not. When this happens, the connection will fail.

To fix this, turn off TLS 1.1 and TLS 1.2 in "Ctrl + F12 -> advanced -> security -> security protocols". Then, Opera won't tell the server it supports TLS 1.1 and TLS 1.2 and then the server won't lie to Opera.

Since barely any servers use TLS 1.1 and 1.2, turning these off shouldn't affect many sites. But, if you ever have a problem connecting to a site securely, try re-enabling these.

2 email servers that are known to do this are mail.siol.net (for SMTP) and pop.netvigator.com (the SMTP server probably has the bug too).

Check Your HOSTS File

Linux: "/etc/hosts"
Windows: "C:\Windows\System32?\drivers\etc\hosts"

Open your HOSTS file with a text editor and make sure the settings are correct.

Usually, you'll just want one entry that looks like this:

127.0.0.1 localhost

But, you may have a more advanced hosts file. In that case:

Make sure that there are no non-ascii characters in the file.

Make sure names are separated by a space and not a comma. For example:

Bad:

127.0.0.1 localhost, foo, bar

Good:

127.0.0.1 localhost foo bar

Also, if you're behind a router and you have something like:

127.0.0.1 localhost computer_name

, try

127.0.0.1 localhost
your_ip_address computer_name

instead. Or, use your router's ip address instead of your ip address, whatever works for you. You may even have to do something like that if smtp connections on your network run through a proxy somehow.

Also, if there's more than localhost after 127.0.0.1, try making sure that localhost comes first to see if that helps. Or, at least make sure that the one that comes after 127.0.0.1 doesn't have any characters in it (like parentheses) that would make the hostname invalid. Again, make sure all hostnames are valid.

Also, if your computer name has apostrophes in it, change your computer name to not have them, and if you make use of your computer name in your HOSTS file, update your HOSTS file to match.

Also, if your hosts file *looks* fine, make sure it doesn't have any null bytes in it. Examine it with a hex editor if you have to make sure there are no hidden, invalid characters.

Whenever you update your HOSTS file, you may have to restart Opera or the computer to see the effects.

The error you usually get when there's a host file issue is "failed to prepare message for sending".

For an example of a hosts file problem and fix, see this thread.

Enable Logging

While Opera is closed, in accounts.ini for the account, set "Outgoing Log File" to the location you want Opera to save the SMTP log file. For example, you could set it to "c:\Documents and Settings\user\desktop\smtp_log.txt" (minus the quotes).

That may reveal more information about what's wrong.

Check What's in the To, Cc and Bcc Fields

Do you have a lot of contacts that you're trying to send to in one of the fields? Try sending to less to see if the message doesn't get stuck in the outbox.

If it still does, try sending just plain email addresses. For example:

Try this:

user1@example.com, user2@example.com

instead of:

"User 1" <user1@example.com>, "User 2" <user2@example.com>

Especially check that if any of the characters in the display names have non-ascii characters. One of them could be causing Opera to get stuck sending the message.

In testing myself, I've noticed that 600 example addresses in the To field will cause Opera to not save a draft, and therefore, probably not send the message correctly.

Check the Forums

On the Opera forums, there's an existing "Outgoing mails stuck in outbox" thread that may be of some help. See http://my.opera.com/community/forums/topic.dml?id=534281

There are 3 comments on this page. [Display and/or add comments]