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

Error with sending email #168

Open
Grantglass opened this issue May 25, 2021 · 3 comments
Open

Error with sending email #168

Grantglass opened this issue May 25, 2021 · 3 comments
Assignees

Comments

@Grantglass
Copy link

system/application/libraries/SendMail.php:109

Looking at that file, it actually looks like there is a discrepancy between the instructions in the config file and the sendmail code.

That function starts with:
private function send($arr=array()) {

    $mail = new PHPMailer;

    $smtp_host = $this->CI->config->item('smtp_host');
    if (!empty($smtp_host)) {

Note that it’s instantiating a new PHPMailer object, and that’s what is being defined. That object also is pulling the $smtp_host from the config section, which is defined by the environment variable SCALAR_SMTP_HOST - This makes it look like the config instructions and the code are not in alignment.

@craigdietrich
Copy link
Collaborator

Hi @Grantglass,

Thanks for reaching out! I admit that I'm not sure what problem you're describing? Could you elaborate?

@craigdietrich craigdietrich self-assigned this May 30, 2021
@Grantglass
Copy link
Author

Grantglass commented May 30, 2021 via email

@craigdietrich
Copy link
Collaborator

Right, so, the way we implemented the email system is using SMTP, and 'new PHPMailer' is an SMTP helper class unrelated to PHP's mail() function. You'd need to have SMTP active on your server and an account (e.g., a Gmail account or an institutional account) to point the SMTP fields towards.

There is no support for mail(), though that doesn't mean we can't add it, say with a field in local_settings.php that lets you choose SMTP vs mail(). I can add this to our list, but it might take a little while.

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