close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Email sending issues.

Thread began 6/12/2014 7:15 am by akstudio | Last modified 6/12/2014 10:47 am by Jason Byrnes | 2493 views | 16 replies |

akstudio

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.

Sign in to reply to this post

Jason ByrnesWebAssist

In the webassist/email folder delete the mail_php.php and mailformatting_php.php files, then edit the UE behavior to recreate them

for the From address, make sure to use a valid email address for your domain, and leave the go to page blank for now.

then add the following codse at line 1 to turn on error reporting:

<?php 
error_reporting(E_ALL);
ini_set('display_errrors','on');
?>



and this code in the page body to write the session contents:

<?php var_dump($_SESSION); ?>



the session contents will contain the success or failure for the email for troubleshooting.

Sign in to reply to this post

akstudio

array(9) { ["emaillog"]=> int(26) ["WAUE_customer_service_1_Status"]=> NULL ["WAUE_customer_service_1_Index"]=> NULL ["WAUE_customer_service_1_From"]=> NULL ["WAUE_customer_service_1_To"]=> NULL ["WAUE_customer_service_1_Subject"]=> NULL ["WAUE_customer_service_1_Body"]=> NULL ["WAUE_customer_service_1_Header"]=> NULL ["WAUE_customer_service_1_Log"]=> NULL }


Hmmm. Let me think for just a minute....

Everything is null, and Ive received no email

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

akstudio

OK

OK thanks

Sign in to reply to this post

akstudio

PM sent

PM sent

Sign in to reply to this post

Jason ByrnesWebAssist

see PM

Sign in to reply to this post

akstudio

see PM

Sign in to reply to this post

Jason ByrnesWebAssist

see PM

Sign in to reply to this post

akstudio

PM

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...