hi,
I am here to find and suppy smtp credentials if required to the mail server. But how can i know whether my server requires it or not?
I am scripting in PHP and using PHPMailer
hi,
I am here to find and suppy smtp credentials if required to the mail server. But how can i know whether my server requires it or not?
I am scripting in PHP and using PHPMailer
Well, if it truly is "your" server, then you should know how you configured it. If it is not, and that information is not supplied to you, then try sending a test mail without credentials. If it works, voila!
If you mean how to generically discover from PHP whether the mail server needs credentials, that should not be your job. It should be up to the user to configure.
Simple... have PHPmailer attempt to send an email without credentials. If the email's rejected for lack of credentials, ->Send()
will return an error and you can look at $ErrorInfo
for the details.
If authentication is required, then generally the send attempt will be rejected with SMTP Error 530.