Yep, I know PHP4 has died, but it's a control panel solution so not upgradeable until they change their source packages. Speaking as someone who has worked in the hosting industry for over 7 years, I know forcing your customers to upgrade can cause more problems than not upgrading to begin with. You'd be shocked at how many of them use 4+ year old scripts that contain deprecated functions that don't work on upgraded systems. Always a good idea to keep an old server or 2 around for cases like that, simply because they don't want to get their code rewritten
Anyway, back to the subject at hand....
Here's what I currently have:
Code: Select all
Swift_Errors::expect($e, "Swift_Exception");
$smtp =& new Swift($conn);
$subject = "Subject"
$body = "Random body";
$message =& new Swift_Message($subject, $body);
$result = $smtp->send($message, new Swift_Address($to, $to), new Swift_Address($from, "Company Name"));
With your new line added, I now get a different error:
Code: Select all
Fatal error:
Uncaught Error of type [swift_badresponseexception] with message [Expected response code(s) [250] but got response [530 5.5.1 Authentication Required m34sm1737189waf.48]]
I assume it doesn't matter that I'm not checking for errors immediately after creating the Swift instance? I obviously need to set the message content, so figured I could check after attempting to send?
Still haven't slept, so sorry if I'm completely off the ball here
