Send mail in laravel 5x (xampp, php 7, windows, local) - laravel

i'm doing sendmail using laravel , but error
i'm try
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=abcd#gmail.com
MAIL_PASSWORD=******
MAIL_ENCRYPTION=tls
but eror
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Help me fix.

Ensure you're using the correct port number. "465" worked for me.
Also ensure you have correctly configured your gmail account as such.
Go to your Gmail account, perform following modification:
Go to Settings > Protocols > SMTP and select "Delivery of Email" tab
Enter "smtp.gmail.com" in the Remote Host name field.
Enter "465" as the port number.
Check "Server requires authentication".
Enter your Google Mail address in the Username field.
Enter your Google Mail password in the password field.
Check mark "Use SSL"
Save all changes.

Related

smtp Connection could not be established in postman - laravel

I am trying to make an api authentication system with email verification but i get this error in postman:
"message": "Connection could not be established with host
smtp.mailtrap.io :stream_socket_client(): unable to connect to
tcp://smtp.mailtrap.io:25 (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.\r\n)",
This is my env file:
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=25 (and 587 , 2525)
MAIL_USERNAME=3aeeeeeeeeee87a
MAIL_PASSWORD=2104eeeeeeeeee9
MAIL_ENCRYPTION=TLS
MAIL_FROM_ADDRESS=test#gmail.com
MAIL_FROM_NAME="${APP_NAME}"
I have run:
php artisan config:clear
php artisan cache:clear
Restart XAMPP
mail.php values are as same as .env file but still get the same error, how can I solve this?
You must be entering the email in the wrong format(in input), set the validation of the email, or enter the email in a proper format and then try it will work.

Can't force phpMailer to send mail from nginx server

I use actual version of phpMailer (downloaded yesterday from github). It sends mails from my local computer (Win10, xampp 7.4.3) and can't send it from server (centOs7, nginx, php7). Both computers in one LAN behind the same firewall.
I suspect php.ini configuration, but what should be configured exactly?
Thanks for any help.
The solution:
# sudo setsebool -P httpd_can_sendmail 1
The tracking of my search:
Switch on the DebugMode in phpMailer (for each new PHPMailer object):
$mail = new PHPMailer\PHPMailer\PHPMailer();
$mail->SMTPDebug = 4;
Checking out 'Console' tab output in Chrome DevTools:
SMTP ERROR: Failed to connect to server: Permission denied (13)
Googling for the error text - https://stackoverflow.com/a/50302148/9751142
Hope this helps anybody else.

Unable to send email using swiftmailer library. Getting Expected response code 250 but got code "550". How to fix this?

My laravel application isn't working with mijn domain smtp mail.
SMTP credentials
These are the credentials for my smtp mail.
This is my .env file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.transip.email
MAIL_PORT=465
MAIL_USERNAME=noreply#schouwenduivelandinbeeld.nl
MAIL_PASSWORD=Hallootjes123
MAIL_ENCRYPTION=ssl
I get this error:
The error i get
What am i doing wrong?

Laravel 5.3 mail settings being ignored

I have amended the .env file with the correct setting for my mail server:
MAIL_DRIVER=smtp
MAIL_HOST=***********.secureserver.net
MAIL_PORT=465
MAIL_USERNAME=*************
MAIL_PASSWORD=*************
MAIL_ENCRYPTION=null
but when I try it out via the forgot password I always get:
Swift_TransportException in StreamBuffer.php line 269:
Connection could not be established with host mailtrap.io [Connection refused #111]
I have searched to find out another instance of mailtrap.io but can only find it in the example of env.
Thanks to everyone. It seems that it was a fault in my ftp client (Fileziller). It was reporting that it had uploaded the file OK but indeed it had not. When I went on the server and looked at the datetime of the record is was wrong.
I erased it and reuploaded and all was well.
A lesson for the future!

How to send email using tibco mail activity

I am a beginner is TIBCO.I want to send email using tibco mail activity.Following are my configuration of send mail activity
host: smtp.gmail.com:587
selected the authenticate check box
then in username field entered my gmail username and in password entered my gmail password.
and in the input tab provided the valid to address,subject and body.When I run then I get the following error
BW-MAIL-100019 Job-10000 Error in [Sender.process/Send Mail]
Error sending mail message. Cause: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. nx12sm74930440pab.6 - gsmtp
I have also checked by changing the host like this smtp.gmail.com:25 but still the same error.Can any body please tell me what wrong am I doing?
Follow these instructions to use the Send Mail activity over TLS (port 587):
First, retrieve the full certificate chain of the SMTP server. To do so, download an OpenSSL client (e.g. GnuWin32's implementation if you are on Windows), then type:
openssl s_client -showcerts -connect smtp.gmail.com:587 -starttls smtp
A list of PEM-formatted certs should show up. Copy each of them in a separate file (or all of them in a single file) with extension .cert and add those files to any folder in your BW project. Please note that the root CA certificate is missing from the chain; you can download it here and add it to the certs folder. You can also use an external folder if you want the certs to be managed outside your project by using the BW_GLOBAL_TRUSTED_CA_STORE global variable (see BW documentation).
On the Send Mail activity, set the Host field to smtp.gmail.com:587.
If using BW 5.8 or below, add the following Java properties to the TRA of your application:
java.property.mail.smtp.starttls.enable=true
java.property.mail.smtp.starttls.required=true
If using BW 5.10 or above, check the SSL box and make the Trusted Certificates Folder point to your certs folder.
Check the Authenticate box and set the User Name (xxxx#gmail.com) and Password fields with your Google credentials.

Resources