I made an application who send many emails for different actions, i tested with Mailtrap.io. Everything is going well with this test service but when i tried to migrate the the real smtp from my domain. Nothing happen.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mydomain.eu
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
When i put MAIL_PORT = 25 i have no exception but any mails is send. When i put the port 565 i get
Connection could not be established with host
smtp.mydomain.eu [Connection refused #111]
If i put the username and password from the mail adresse i configured in the plesk it's change nothing.
The serveur use SSH maybe the error comes from this ?
Hope someone could help me .. thanks a lot in advance.
port "565" ? Pls. make sure, that the actual used port in your script is actually the one you would like to connect to!
#25 smtp (TCP)
#110 pop3 (TCP)
#143 imap (TCP)
#465 smtps (TCP)
#993 imaps (TCP)
#995 pop3s (TCP)
AND
#587 mail message submission (TCP)
It is port 587 with ssl encryption,
But you must active port 587 in your plesk domein.
You must check the option "Enable SMTP on port 587 for all IP addresses" Then you can send mail from port 587.
The check option is location in your default mail settings, not your domein settings.
Related
I'm using JavaMailSender and Outlook SMTP server for sending emails in a SpringBoot project.
Mail config:
host=smtp-mail.outlook.com
port=587
mail.transport.protocol=smtp
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.debug=true
When testing locally, everything works fine - email is sent to port 587 (see below) and delivered to the user.
DEBUG SMTP: trying to connect to host "smtp-mail.outlook.com", port 587, isSSL false
DEBUG SMTP: connected to host "smtp-mail.outlook.com", port: 587
The problem: When testing on production (Heroku server), email is being sent to port 5104:
DEBUG SMTP: trying to connect to host "smtp-mail.outlook.com", port 5104, isSSL false
That eventually ends with timed out connection exception and email is never sent to the user.
java.net.ConnectException: Connection timed out (Connection timed out). Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp-mail.outlook.com, 5104; timeout -1;
Edit: I've also figured that it uses different port on every email send try:
DEBUG SMTP: trying to connect to host "smtp-mail.outlook.com", port 58079, isSSL false
What is the reason for this behaviour? Why is it not using given port?
I have been trying to create my own server using cyberpanel on vultr I already created my email and issue ssl and configured my dns and my reverse dns but when I login to my rainloop my message would be sent but won’t deliver but if I send a mail to my rainloop mail account I get it quickly but can’t reply from my rainloop,I have tried setting up my imap and pop3 in the rainloop admin to connect it with gmail still the same way please what should I do
Have you verified the ports are open? These ports are blocked by default at Vultr. You may request removing the blocks by opening a support ticket.
TCP port 25 (SMTP)
TCP & UDP port 137
TCP & UDP port 138
TCP & UDP port 139
TCP & UDP port 445
TCP port 1688 (KMS, inbound only)
There are three SSL options on CyberPanel, you need to select email SSL for your email to work
Every provider blocks port 25 to control spam. Contact your ISP or if you are hosting your server on Digital Ocean or AWS request them to unblock port 25 ( They never agree, at least for me )
I have build a Go server using Echo framework, i get TLS certificades and a domain name, but when i try a request i get the message "Client sent an HTTP request to an HTTPS server." and when i try acces the server from the IP address of the EC2 using the port 443, it says that the connection is not secure:
And when i change the server to the port 80 to acces through the domain name, i get the following error:
I'm starting the server using the StartTLS func
e.Logger.Fatal(e.StartTLS(":80", "/etc/letsencrypt/live/anltcsprod.enrtt.com/fullchain.pem", "/etc/letsencrypt/live/anltcsprod.enrtt.com/privkey.pem"))
Is it something wrong with my domain or certificade?
Port 80, by default, communicates over HTTP. 443 is reserved for HTTPS traffic. Assuming nothing else is wrong, you should be able to simply change your e.StartTLS() to this:
e.Logger.Fatal(e.StartTLS(":443", "/etc/letsencrypt/live/anltcsprod.enrtt.com/fullchain.pem", "/etc/letsencrypt/live/anltcsprod.enrtt.com/privkey.pem"))
For example localhost:4000
Instead use https://localhost:4000
when i am using smtp without ssl it giving this error
MAIL_DRIVER=smtp
MAIL_HOST=mail.onestopdigitalagency.com
MAIL_PORT=587
MAIL_USERNAME=thankyou#onestopdigitalagency.com
MAIL_PASSWORD=********
MAIL_ENCRYPTION=
a month ago it was workig fine
and if I use this it send email but not to gmail
MAIL_DRIVER=smtp
MAIL_HOST=mail.onestopdigitalagency.com
MAIL_PORT=465
MAIL_USERNAME=thankyou#onestopdigitalagency.com
MAIL_PASSWORD=********
MAIL_ENCRYPTION=ssl
and on tls setting it giving timeout error
I recently ran into this problem with an email provider that upgraded their services to have tighter TLS security requirements. The error was the result of the remote connection being forced closed. In your case, you were not using encryption and it was working fine, but now they are requiring encryption and their SMTP server is closing the connection.
You could also use the tls setting if you change the port to 587. Port 465 is SSL, TLS is used with ports 25 or 587.
I have been using Laravel for a little while now, so thought I would dive into HTML emails, so I followed a tutorial.
The issue I have, as well as seemingly quite a few others is this:
Swift_TransportException in StreamBuffer.php line 269:
Connection could not be established with host smtp.gmail.com
[A connection attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because connected host has failed to respond.
#10060]
My .ENV
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=EMAIL
MAIL_PASSWORD=PASS
MAIL_ENCRYPTION=tls
I have also tried ports 25 and others suggested, as well as ssl as opposed to tls, I have also tried using sendmail as opposed to smtp.
Further to this, I have the same issue when trying with an Outlook account.
I even enabled the option to accept items from less secure applications.
Anyone else experiencing these issues?
UPDATE:
I am having the same issues with Mail Trap, could it be my laravel install?
Also tried with a fresh install...
FURTHER UPDATE
When I ping any site, I get request timed out, which means I think my router is blocking me?
According with help for administrator page of Google, when you try to connect by port 465 this requires encryption SSL, on the contrary if you use TLS you should set the port to 587, try changing the port on your .env file.
Reference: https://support.google.com/a/answer/176600?hl=es
.env file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=youremailaddress
MAIL_PASSWORD=yourownpassword
MAIL_ENCRYPTION=tls