-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email Library does not have an public test of connection function #3402
Comments
Sending a test-email to the admin setting up the configuration? Many of the software packages I use do that. |
But i don't want to send a message just to check if the connection is established. I want to check the configuration if it is configured correctly then send an email test. Anyway if an checker exists i don't see why you want to send a message just to check it, maybe only to check how it was sent. |
For example the mail-server may reject your FROM or TO addresses, something you probably won't get an error for until you actually try to send it. Personally, I'd say that testing email sending isn't done until you have the email in your inbox, but that's just my personal opinion. |
Let say you have an application with an administration panel and a page "Self-Diagnostics". One of the widgets there might say "Your mailer server is enabled, but there is something wrong on your configuration - connection can not be established." + some technical details. Not a bad idea, epecially for publicly distributed applications. There is a similar active issue for PHPMailer PHPMailer/PHPMailer#612 with some considerations. |
In reply for Tangix, again you don't have to send an email just to check the connection even if FROM or TO addresses going to be rejected, i just need to verify the user and the password if it can connect to the emailing service that's all. I saw something on stackoverflow and it is simple to implement, i just dont like to hardcode it, i just want to nicely been build in codeigniter 4 style, with all options considered.
it is as simple as you see here. And you see you don't need the error message just a notice that it is an error somewhere... |
If you'd like to open a Pull Request this seems like a nice addition. Keep in mind that the email class supports multiple handlers, which may have different needs for qualifying connection status. |
@MGatner i know man, i dont know how to use the pull requests, i would have done this already on other issues aswell. Maybe i am going to learn this in the near future after i finish my work, i really have to finish first. |
A great way to start is just using GitHub's interface. Since
That's it! I believe in you :) |
Oh my god so easy man lol, never saw the EDIT option LOL |
Does anyone still need this feature? |
I'd say close it for now. We can always revisit if it becomes a higher priorityh. |
I always wanted to test different config connection for the Email Library if it works or not.
The thing is, i can do that with sending an message, but i don't want to send a message just to check if the connection is established.
I've searched already for some function to work with, but they are all protected functions so i can't use it out of the class.
I hope someone can implement this basic important function, with all three types of protocols. sendmail, mail, SMTP.
I know for the mail function it does not require any type of test, it will work for sure if the server has an emailing servicee.
The problem comes with sendmail and SMTP.
Sendmail the path can be changed. so i want to test this path.
SMTP has so many possible configurations along with a user and a password.
Whenever i set a connection i just want to test if the config is a valid configuration so i can save the configuration to the database and not send an email to check if the config is valid.
At least make a public function for the SMTP configuration to test it if not for all protocols.
The text was updated successfully, but these errors were encountered: