I want create a function in PHP where I want configure or check SMTP connection throught above form.
If user input all details and click button then, code validate all credentials is correct or not, if correct then echo SMTP Verification Done else SMTP Failed [$reason]
I find this trouble on stackoverflow and this community but I couldn’t find that same I want. I am not only one who asking this question.
What code do you have so far? First off, start with the PHP code to get the information from the form and check that each field has been filled in. Once you’ve done that, you can add more complex validation code.
No, I haven’t code and I couldn’t found on google…
But I have questions ,Let supposed I want to check user SMTP credentials connected to the host or not.
So I made the above form user enter his data like Host,Port,Password,Email,SSL/TLS and hit submit form authentic the data, iF data correct and SMTP correctly connected to HOST echo successful else bad credentials.
no, I not made the code yet… I dont knowledge what its initialization… I try to find this on big Question site stackoverflow but i also couldn’t find there…
My guess is because it’s very big. Too big for a simple “here’s the answer”.
Having an idea of what you want to develop is good. And putting together a mock-up form is good. But it is only the barest beginning.
What “SMTP” related functions does PHP have? AFAIK, none. If I’m wrong, please correct me, if I’m right, you’ll need to look at PEAR / PECL or something else more than what comes with PHP “out of the box”.
This will require knowledge of your particular set-up.
In cPanel it installed, As when download some shopping website through softaculous , in that shopping admin>Email setting we can see SMTP configuration form…