Hostgator shared hosting - emails sent via PHP mail not delivered

Emails sent using PHP mail() function are not reaching recipients. Sender's domain is a domain that has a website hosted on the same Hostgator server (which I believe is a requirement).

After a bit of troubleshooting I found that the issue occurs if recipient's domain has a website hosted on the same Hostgator server as well (but email on a different system).

Simple PEAR PHP script to send emails using AuthSMTP

 
require_once "Mail.php";
function send_mail_pear (){
 $mail_to = 'This email address is being protected from spambots. You need JavaScript enabled to view it., This email address is being protected from spambots. You need JavaScript enabled to view it.';
 $mail_subject = 'Enquiry From Website';
 $mail_from = 'My Website <webmaster@domain>'; // make sure email is authorised in your AuthSMTP account
$mail_body = 'Email body HTML';
 
$headers = array(
 'From' => $mail_from,
 'To' => $mail_to,
 'Subject' => $mail_subject,
 'Content-type' => 'text/html; charset=utf-8');
 
$smtp = Mail::factory('smtp', array(
 'host' => 'ssl://mail.authsmtp.com',
 'port' => '465',
 'auth' => true,
 'debug' => false,
 'username' => 'accountId', // Your AuthSMTP account username
 'password' => 'Password' // Your AuthSMTP account password
 ));
 
$mail = $smtp->send($mail_to, $headers, $mail_body);
 if (PEAR::isError($mail)) { //Email sending failed (to troubleshoot set 'debug' => true)
 return (false);
 } 
 else{ // Email was sent successfully
 return (true);
 }
}
 

Logitech Harmony Hub and Amazon Alexa integration issues

Logitech recently added Amazon Echo Alexa integration for Hub based Harmony remotes. This promises a fantastic smart-home voice enabled integration allowing complete control over your home entertainment system. For example, simply saying "Alexa, turn on TV" can turn on your TV, AV Receiver, Cable Box, set everything to the right inputs, dim your smart-light, etc. This sounds like the future! Unfortunately, making everything work correctly was much more painful than it should have been...

After enabling Alexa's Logitech Harmony skill and adding some keyword for my Harmony Activities I immediately noticed how inconsistently the integration worked. Occasionally commands were executed immediately, but more often than not, Alexa would "think" for a while with spinning blue circle and then responds with "I was unable to reach your Logitech Harmony Hub..." message and suggest to visit some non exiting Logitech "Alexa Errors" help page... Interestingly, sometimes few minutes after this response, Harmony would actually run the Activity requested! 

This wasn't a complete surprise as Alexa's Harmony skill had only 2.5 star average rating (in the UK). After looking around a bit I decided to try Yonomi integration. Apart from better ratings in Amazon Skill's store, Yonomi also had few advantages over native Logitech Alexa skill. For example, Yonomi integrates via Alexa's Smart Home system which allows to run commands without having to specify the skill - instead of saying "Alexa, tell Harmony to turn on TV", you can simply say "Alexa, tun on TV", which is much quicker and more natural.

Unfortunately, Yonomi didn't work any better than the native Logitech skill. The only difference was that with Yonomi integration Alexa would allows respond "OK" and then do one of the three: either execute the activity immediately, never execute it, or execute few minutes later...

Installing Toastman’s Tomato on Asus RT-N16

Toastman’s Tomato custom router firmware has great tools for tracking both live and historical client data transfers (download / upload / bandwidth). This was the main reason for installing "Tomato" on my Asus RT-N16. I tried using this tutorial but kept having issues trying to uploading the firmware via Asus Firmware Restoration Utility. Instead I went slightly different route.



Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait