Skip to content
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

php mail function fails because you are not checking already set ini values(?) #2858

Closed
f1-outsourcing opened this issue Jan 12, 2023 · 1 comment

Comments

@f1-outsourcing
Copy link

f1-outsourcing commented Jan 12, 2023

Problem description

If I comment out this line, I am able to send email

$params = sprintf('-f%s', $this->Sender);

Looking at this line

//Calling mail() with null params breaks

This is crap, this depends if your hoster has setup the ini var sendmail_path for you (and maybe protected it, so you can not change it). Even the php manual says it is OPTIONAL.

https://www.php.net/manual/en/function.mail.php

If I do print_r of params I see object values with something like this, so it looks like you are appending ini variables without even checking if they are already set, necessary or correct.
In any case the code that is trying to set this automatically is bad and worse than leaving params empty, so please remove this code asap.

[email protected]

So I guess your PHPMailer does not work in quite a lot of setups where just mail function is requested. I have 'dumb' wordpress developers whining that they need SMTP auth because this is not working.

I do hope you take into account with your coding that some ini vars are or can be protected (if I remember correctly).

@f1-outsourcing f1-outsourcing changed the title php mail function fails because you are not checking already set ini values. php mail function fails because you are not checking already set ini values(?) Jan 12, 2023
@Synchro Synchro closed this as completed Jan 12, 2023
@Synchro Synchro closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2023
@f1-outsourcing

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants