contact forms doesnt work...

the mail() function

Moderators: egami, macek, gesf

Post Reply
Thalia1983
New php-forum User
New php-forum User
Posts: 5
Joined: Fri May 20, 2016 12:42 am

Fri May 20, 2016 12:55 am

hi guys,
I have a joomla site on ec2 - microsoft windows server..
I have verified email address on amazon ses / amazon workmail and I took smtp credentials
when I trid to check if contact forms work gave errors such as:
- Could not instantiate mail function
- Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in C:\xampp\htdocs\lacorallina.co.uk\libraries\vendor\phpmailer\phpmailer\class.smtp.php on line 344

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\lacorallina.co.uk\libraries\vendor\phpmailer\phpmailer\class.smtp.php on line 344

and when I tried to check if reservation form works gives me that error:
An error occured during sending your message:
SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Message rejected: Email address is not verified. The following identities failed the check in region US-WEST-2: admin@lacorallina.co.uk, "lacorallina.co.uk" SMTP code: 554

my website is lacorallina.co.uk

I have been searching many days to find a solution...

I am even thinking if is a windows server issue...since from xampp\php\extras\openssl missing the pem file...

I would be greatful if you could give me some help...

Thanks in advance....

element121
php-forum Fan User
php-forum Fan User
Posts: 622
Joined: Sat Jun 06, 2015 11:46 am
Contact:

Fri May 20, 2016 2:28 am

What's your reason for running Joomla / PHP on a Windows server?
Why aren't you running in on Linux?

Thalia1983
New php-forum User
New php-forum User
Posts: 5
Joined: Fri May 20, 2016 12:42 am

Fri May 20, 2016 10:42 am

my client's choice my friend....

now I must solve the problem as it is....

I dont know if you have something else to suggest me...

but...

must be a solution ... I must do something...!

do you think I should transfer the website to a linux machine?

element121
php-forum Fan User
php-forum Fan User
Posts: 622
Joined: Sat Jun 06, 2015 11:46 am
Contact:

Fri May 20, 2016 4:13 pm

Did you google the error message?

I did and found this, does it help?
http://stackoverflow.com/questions/1588 ... t-accepted

Thalia1983
New php-forum User
New php-forum User
Posts: 5
Joined: Fri May 20, 2016 12:42 am

Sun May 22, 2016 12:58 pm

element121 wrote:Did you google the error message?

I did and found this, does it help?
http://stackoverflow.com/questions/1588 ... t-accepted
Well, my friend.. am not sure..
but in here https://github.com/PHPMailer/PHPMailer/ ... leshooting
might be the solution....->
Authentication failures
probably this:
"You have specified authentication without encryption"

My username and password am sure they are correct...
my hostname ok
email verified
SMTPSecure = 'tls'
am trying to see how can I set smtp port to 587 in amazon smtp...

and...
I have checked in my windows server.. and in \xampp\php\extras\openssl
and .pem file is missing
but I dont know how to deal with it....

...................
Am going to do the last efforts... and then I will have to transfer the website to a linux server (ubuntu) to check if things goes better there....

Thalia1983
New php-forum User
New php-forum User
Posts: 5
Joined: Fri May 20, 2016 12:42 am

Mon May 23, 2016 12:32 am

Thalia1983 wrote:
element121 wrote:Did you google the error message?

I did and found this, does it help?
http://stackoverflow.com/questions/1588 ... t-accepted
Well, my friend.. am not sure..
but in here https://github.com/PHPMailer/PHPMailer/ ... leshooting
might be the solution....->
Authentication failures
probably this:
"You have specified authentication without encryption"

My username and password am sure they are correct...
my hostname ok
email verified
SMTPSecure = 'tls'
am trying to see how can I set smtp port to 587 in amazon smtp...

and...
I have checked in my windows server.. and in \xampp\php\extras\openssl
and .pem file is missing
but I dont know how to deal with it....

...................
Am going to do the last efforts... and then I will have to transfer the website to a linux server (ubuntu) to check if things goes better there....
and becasue you asked me... of course and I have google all the error messages but I havent managed to find the appropriate solution yet....

Thalia1983
New php-forum User
New php-forum User
Posts: 5
Joined: Fri May 20, 2016 12:42 am

Mon May 23, 2016 2:25 am

Am so happy..
finally I make it work,,,
I manage to set an outbound rule on security group of my instance on aws... to port 587...

I am going to check how secure are the steps I did and I hope everything is going to be fine..!

Thank you very much for your time my friend (element121)...

boxfly
New php-forum User
New php-forum User
Posts: 9
Joined: Mon Mar 06, 2017 5:17 am

Thu Mar 09, 2017 7:08 am

To get message failures from the PHPMail plugin, I do:

Code: Select all

   
    //True param means it will throw exceptions on errors
    $mail = new PHPmailer(true);
    try {
       //...All your stuff....
        $mail->Send();
    } catch (phpmailerException $e) {
        //Pretty error messages from PHPMailer
        echo $e->errorMessage();
    } catch (Exception $e) {
        //Boring error messages from anything else!
        echo $e->getMessage(); 
    }

Post Reply