Difference between revisions of "Can't send email"
(→Errors) |
|||
(34 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Can't send email== | |||
This error can appear when trying to send email from Email section or when user registers: | This error can appear when trying to send email from Email section or when user registers: | ||
Line 4: | Line 5: | ||
We've been notified about this issue and we'll take a look at it shortly. | We've been notified about this issue and we'll take a look at it shortly. | ||
* Try to use Gmail account to check if problem is caused by smtp provider. Example of Gmail account configuration can be found below, on [[Can%27t_send_email#Default_settings | Default settings]]. | |||
* [[Check GUI log]] | |||
==Default settings== | |||
* SMTP Server: smtp.gmail.com | |||
* Port: 25 | |||
* Login: kolmitest | |||
* Password: kolmitest99 | |||
* Batch Size: 50 | |||
== Test == | |||
/usr/local/mor/sendEmail -f 'mortest@gmail.com' -t 'WRITE_YOUR@EMAIL.HERE' -u 'test' -m 'test message' -o tls=auto -s 'smtp.gmail.com' -xu 'kolmitest' -xp 'kolmitest99' | |||
Output should be: | |||
sendEmail[11683]: Email was sent successfully! | |||
==Errors== | ==Errors== | ||
Line 35: | Line 51: | ||
* <%= login_username %> | * <%= login_username %> | ||
* <%= login_password %> | * <%= login_password %> | ||
* <%= username %> | |||
* <%= first_name %> | |||
* <%= last_name %> | |||
* <%= full_name %> | |||
<br> | |||
===Timeout::Error (execution expired) /usr/lib/ruby/1.8/timeout.rb:54:in `open'=== | |||
Open port 25 to allow SMTP connection. | |||
<br> | |||
===Segfoults and any other crashes=== | |||
These mean that mail traffic is passing a transparent proxy server which doesn't understand the 'auth plain' option. Ask your network administrator for more info. | |||
===OpenSSL::SSL::SSLError (unknown protocol)=== | |||
No solution yet... | |||
I had this same problem and it turned out that I was using the wrong imap port, as for SSL authentication | |||
you need to use port 993 or 995. | |||
<br> | |||
===ECONNREFUSED=== | |||
<br> | |||
===SocketError (getaddrinfo: Name or service not known)=== | |||
Execute (on Debian): | |||
apt-get install mime-construct | |||
mime-construct --to "your@mail.com" --subject 'hi there' --string "body" | |||
Go to '''/var/log/exim4/mainlog''' | |||
If you see: | |||
2008-04-14 08:35:06 1JlOMs-0001fU-I4 <= root@GUI.cantv.net U=root P=local S=404 | |||
2008-04-14 08:35:12 1JlOMs-0001fU-I4 ** your@mail.com R=dnslookup T=remote_smtp: SMTP error from remote mail server after end of data: host gmail-smtp-in.l.google.com [64.233.185.27]: 550-5.7.1 [190.37.134 | |||
.234] The IP you're using to send mail is not authorized\n550-5.7.1 to send email directly to our servers. Please use the SMTP\n550-5.7.1 relay at your service provider instead. Learn more at\n550 5.7.1 http: | |||
//mail.google.com/support/bin/answer.py?answer=10336 7si13749186wrl.12 | |||
... it means you should use your provider's SMTP server to send emails. | |||
<br> | |||
===501 Syntactically invalid HELO argument(s)=== | |||
Received: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1) | |||
Domain is empty. Enter: localhost.localdomain | |||
<br> | |||
===503 AUTH command used when not advertised=== | |||
... no data ... | |||
=== 504 5.5.2 : Sender address rejected: need fully-qualified address === | |||
More info: [[GUI Error - Sender address rejected]] | |||
=== Connection attempt to mail.something.com:25 failed: IO::Socket::INET: connect: No route to host === | |||
There is a problem with connecting to smtp server sometimes. Try to test with the other mail service. | |||
=== Authentication to smtp.gmail.com:587 failed === | |||
Sometimes it is required to create an App Password in google account to allow send emails from MOR. | |||
Instructions can be found [https://support.google.com/accounts/answer/185833?hl=en here] |
Latest revision as of 13:43, 27 July 2020
Can't send email
This error can appear when trying to send email from Email section or when user registers:
We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
- Try to use Gmail account to check if problem is caused by smtp provider. Example of Gmail account configuration can be found below, on Default settings.
- Check GUI log
Default settings
- SMTP Server: smtp.gmail.com
- Port: 25
- Login: kolmitest
- Password: kolmitest99
- Batch Size: 50
Test
/usr/local/mor/sendEmail -f 'mortest@gmail.com' -t 'WRITE_YOUR@EMAIL.HERE' -u 'test' -m 'test message' -o tls=auto -s 'smtp.gmail.com' -xu 'kolmitest' -xp 'kolmitest99'
Output should be:
sendEmail[11683]: Email was sent successfully!
Errors
Net::SMTPAuthenticationError (535 auth failure)
Net::SMTPAuthenticationError (535 invalid user ID or password)
On both of these errors:
- Check your SMTP server details
- Try to use another SMTP server
- Try default settings:
SMTP Server: smtp.gmail.com Domain: localhost.localdomain Login: kolmitest Password: kolmitest99
NameError (undefined local variable or method `xxxxxx' for #)
Do not add variables which are not from this list:
- <%= server_ip %>
- <%= device_type %>
- <%= device_username %>
- <%= device_password %>
- <%= login_url %>
- <%= login_username %>
- <%= login_password %>
- <%= username %>
- <%= first_name %>
- <%= last_name %>
- <%= full_name %>
Timeout::Error (execution expired) /usr/lib/ruby/1.8/timeout.rb:54:in `open'
Open port 25 to allow SMTP connection.
Segfoults and any other crashes
These mean that mail traffic is passing a transparent proxy server which doesn't understand the 'auth plain' option. Ask your network administrator for more info.
OpenSSL::SSL::SSLError (unknown protocol)
No solution yet...
I had this same problem and it turned out that I was using the wrong imap port, as for SSL authentication
you need to use port 993 or 995.
ECONNREFUSED
SocketError (getaddrinfo: Name or service not known)
Execute (on Debian):
apt-get install mime-construct mime-construct --to "your@mail.com" --subject 'hi there' --string "body"
Go to /var/log/exim4/mainlog
If you see:
2008-04-14 08:35:06 1JlOMs-0001fU-I4 <= root@GUI.cantv.net U=root P=local S=404 2008-04-14 08:35:12 1JlOMs-0001fU-I4 ** your@mail.com R=dnslookup T=remote_smtp: SMTP error from remote mail server after end of data: host gmail-smtp-in.l.google.com [64.233.185.27]: 550-5.7.1 [190.37.134 .234] The IP you're using to send mail is not authorized\n550-5.7.1 to send email directly to our servers. Please use the SMTP\n550-5.7.1 relay at your service provider instead. Learn more at\n550 5.7.1 http: //mail.google.com/support/bin/answer.py?answer=10336 7si13749186wrl.12
... it means you should use your provider's SMTP server to send emails.
501 Syntactically invalid HELO argument(s)
Received: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
Domain is empty. Enter: localhost.localdomain
503 AUTH command used when not advertised
... no data ...
504 5.5.2 : Sender address rejected: need fully-qualified address
More info: GUI Error - Sender address rejected
Connection attempt to mail.something.com:25 failed: IO::Socket::INET: connect: No route to host
There is a problem with connecting to smtp server sometimes. Try to test with the other mail service.
Authentication to smtp.gmail.com:587 failed
Sometimes it is required to create an App Password in google account to allow send emails from MOR. Instructions can be found here