I have a Codeigniter 3.1.4 site that worked fine until the hosting company changed their email host.
I send emails from my site with PDFs attached, but the smtp provider was changed and I have updated the following values:
defined(‘PROTOCOL’) OR define(‘PROTOCOL’, ‘mail’);
defined(‘SMTP_HOST’) OR define(‘SMTP_HOST’, ‘smtp.titan.email’);
emails still get sent but PDFs are not longer attached, they are added inline:
Content-Type: multipart/alternative; boundary="B_ALT_662fa8a442c93"--B_ALT_662fa8a442c93
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitHi, Please find attached a Service Sheet for your company. Please do not reply to this email address as this account is not monitored.Regards
--B_ALT_662fa8a442c93
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printableHi,=3Cbr=3E=3Cbr=3E Please find attached a Service Sheet for your company=3Cbr=3E=3Cbr=3EPlease do not reply to this email addr=
ess as this account is not monitored.=3Cbr=3E=3Cbr=3ERegards,=3Cbr=3E.--B_ALT_662fa8a442c93--
Content-Type: application/pdf; name="your+company-2024-04-29-090529-Alarm.pdf"
Content-Disposition: inline;
Content-Transfer-Encoding: base64JVBERi0xLjMKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZwovT3V0bGluZXMgMiAwIFIKL1BhZ2Vz
...
I have tried changing $this->email->attach($filepath, 'inline');
to $this->email->attach($filepath, 'attach');
no luck