Email sending issues.
So, I'm on Rackspace, and have had issues with email not going out via PHP. The client tells me they have their own email server, and he sets me up with an account so I can relay email through it.
On the surface, this works.
Here is the working script:
<?php
require_once "Mail.php";
$from = "them@theirdomain.net";
$to = "me@mydomain.com>";
$subject = "Test email using PHP SMTP\r\n\r\n";
$body = "This is a test email message";
$host = "hostname";
$username = "username";
$password = "password";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
That works.
Now, when I put this into Universal email (I left the "path to PEAR blank) No emails are being sent.
I had to setup a separate "insert record" to capture the form data, as this is business critical for the client. I've tried a lot of different settings etc in UA, including allowing it to write to the DB, both for success and / or failure. This wont work either. Because that functionality won't work, I can't see what the "status" or "error" is.
So, we know the email works with the above script, but not with UA is there something I should be looking at or a method to help troubleshoot this issue? I'm using data bridge 1.1.8
Does the client need to "add me to a group" or something else? I do recall when we were testing the above script, it would error out a few times, until he added the email in and allowed the IP. They us Exchange, BTW.