> On 7 Sep 2022, at 21:27, Gareth Evans <donots...@fastmail.fm> wrote:
> 
> 
> 
> 
>> On 7 Sep 2022, at 17:55, Gary Dale <g...@extremeground.com> wrote:
>> I'm using a web hosting company that pretty much limits me to using 
>> PHPMailer on their servers for sending complex e-mails (e.g. with 
>> attachments). That is working.
>> 
>> [...]
> 
>> However when I try it with my local Apache2 server, it doesn't work.
> [...]
>> However the test .php file that works on the hosting company's server 
>> doesn't do anything on my local server. I try to load the page and get 
>> nothing - not even an error message.
> 
> Hi Gary,
> 
> If you expect output of some sort from the script, try putting
> 
> ini_set("display_errors",1);
> ini_set("error_reporting",E_ALL);
> 
> at the top of the script in question - this should show any errors on the 
> page rather than having to look in /var/log/syslog, though that might be 
> worthwhile too.
> 
> Also
> 
> $ php -l file.php
> (Lower case L after dash)
> 
> Do you receive any bounce message in (iirc... or something like...)
> /var/spool/mail/username ?
> 
> Not knowing whether you expect output, it could be that the script is working 
> but the remote server rejects mail from non-routable (ie LAN) IPs - I don't 
> think a bounce message is necessarily guaranteed though.
> 
> Any difference sending with PHPMailer via SMTP ?
> 
> Best wishes,
> Gareth
> 

Having said that re bounce messages, I can'tremember if the error report 
concerned, if any, may actually be found in syslog - it's a while since I've 
seen one as I gave up testing email from local machines for this reason.

Possibly getting ahead of myself here, but it might also be worth mentioning 
greylisting as an issue to be aware of - particularly for email originating 
from non-routable addresses.

"Mail from unrecognized servers is typically delayed by about 15 minutes, and 
could be delayed up to a few days for poorly configured sending systems."

https://en.m.wikipedia.org/wiki/Greylisting_(email)

Reply via email to