super slow PHPMailer / 123reg

Joined
12 Feb 2006
Posts
17,439
Location
Surrey
i wrote breifly about this issue before on here but looking now to finally solve it, with the help of chatgpt

i was with vidahost, then tsohost, and service was fine. once tsohost got bought out by 123reg, they did some migration thing, and perhaps coincidentally, sending emails from my website using phpmail slowed to a crawl, anything from 5 seconds to 15 seconds.

i've endured but now looking to fix this issue once and for all. chatgpt has been at my side and helping me through this, but it seems the main issue is my host, 123reg, with slow response time.

SMTP Delay (13 seconds is slow!)


  • The main delay is here:


    2025-03-13 00:21:34 CLIENT

  • 2025-03-13 00:21:47 SERVER
  • CLIENT:250 OK


  • That’s 13 seconds waiting for GoDaddy’s mail server!

so i'm wondering what to do. chatgpt suggest changing smtp provider as godaddy (i guess this is the same company as 123reg) is too slow.

my issue though is that surely the paid for service with 123reg is going to be better than a free service from the likes of gmail? and what about spam factor, will gmail smtp result in a higher rate of being marked as spam?

one thing i should note is that max we send around 60 emails a day in the busy period and this is spread out througout the day, but it's much closer to 5-10 in quieter periods (winter)
 
Last edited:
i haven't spoke to them yet. i have a tab open to give them a call tomorrow in the day. long gone are the days of vidahost and their speedy online chat at all hours of the night!
 
Last edited:
with no issues of emails being marked as spam?

while i have this thread, is it better for trust by the recipients email provider to have emails sent from an address like contact@domain, or noreply@domain.
 
Do you have SSH access to a machine that the script is running from?

If so, "swaks" is a useful SMTP troubleshooting tool that will show how long each step of connecting/TLS/auth/sending takes. Pipe it through "ts" and you get absolute timestamps too:

Code:
swaks \
--show-time-lapse \
--server smtpout.secureserver.net \
--protocol SSMTPA \
--from [email protected] \
--to [email protected] \
--auth LOGIN \
--auth-user username \
--auth-password password \
| ts %H:%M:%S


thanks. this is the exact code i use. how would i insert swaks into this?

PHP:
$mailCopy = new PHPMailer(TRUE);

try {
    
    //Server settings
   $mailCopy->isSMTP();
   $mailCopy->Host = 'mail.213213.co.uk';
   $mailCopy->SMTPAuth = TRUE;
   $mailCopy->SMTPSecure = 'ssl';
   $mailCopy->Username = '[email protected]';
   $mailCopy->Password = '12345';
   $mailCopy->Port = 465;   
   /* Enable SMTP debug output. */
   //$mailCopy->SMTPDebug = 2;   
  
  
    //Recipients
   $mailCopy->setFrom($your_email, $busi);
   $mailCopy->addAddress($email, $fullname);
   $mailCopy->addReplyTo($your_email, $busi);
  

  
   //Content
   $mailCopy->Subject = $fullname.', here\'s your quote';
   $mailCopy->Body = $body_quote;
   $mailCopy->IsHTML(true);

  
    $mailCopy->send();
    
    //echo '<br />Message copy has been sent';
} catch (Exception $e) {
    echo '<br />Message copy could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
}
 
Back
Top Bottom