close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PHP PEAR settings

Thread began 6/02/2016 3:47 pm by iain331081 | Last modified 6/08/2016 6:10 pm by Ray Borduin | 565 views | 12 replies |

iain331081

PHP PEAR settings

I have an instance of UE all working that we were looking at earlier.

I was looking at routing the emails through Amazon's SES mail servers that we have an account for using PEAR.

I was able to install the PEAR packages, and get the Amazon SMTP credentials to plug into UE, i.e.:

$WA_MailObject = WAUE_Definition("/php","email-smtp.eu-west-1.amazonaws.com","25","my_SMTP_username","my_SMTP_password","true","Amazon SES","","");

At first I thought the emails were sending, but it doesn't look as though they are.

What would you expect to happen if the PEAR settings are incorrect? Just go to the redirect page, or throw up an error somewhere?

Sign in to reply to this post

Ray BorduinWebAssist

It may not throw the error, but the error should be saved into the session.

Create a test page sending a simple email with PEAR and then dump the session after the email sends and it should contain more data including any error messages.

Sign in to reply to this post

iain331081

Thanks Ray - what do I need on a test page to add the email?

I have created a new page, with the database connection and a test recordset, but nothing is happening when I select WebAssist > Create Email Message.

Sign in to reply to this post

Ray BorduinWebAssist

You don't need a database... just apply the create email message server behavior. If it doesn't open that implies a problem with the Databridge installation. Does it open on the other pages?

Sign in to reply to this post

iain331081

Have reinstalled DB and it seems OK now, so I have the test page.

How can I most easily trigger the email, and how do I dump the SESSION - is it PHP var_dump($_SESSION); somewhere?

Sign in to reply to this post

Ray BorduinWebAssist

Yes, you can do it after sending the email or on a new page:

php:
<?php

@session_start();
var_dump($_SESSION);
?>
Sign in to reply to this post

iain331081

Thanks Ray - I pretty much have this all working now - there were a couple of rights issues to sort out with the hosting company.

I just have one last thing not working, which is displaying values from the recordset in the email, e.g.

$MailBody = $MailBody . "Dear";
$MailBody = $MailBody . $row_WADAlodges['Firstname'];

etc

Would that be because of what we looked at with CURL, so they're not being passed because of that extra hop?

I tried to do something with a session for the name by adding:

<?php
@session_start();
if($row_WADAlodges['Firstname'] != "") {
$_SESSION["LodgeFirstname"] = "".$row_WADAlodges['LodgeFirstname']."" ;
}
?>

to the product_results page after the query, and changing the lines above to:

$MailBody = $MailBody . "Dear";
$MailBody = $MailBody . $_SESSION['LodgeFirstname'];

But haven't been able to resolve it.

Sign in to reply to this post

Ray BorduinWebAssist

You would have to add the columns that you wanted to include in the email to the recordset on the sendemail page itself.

Then you could refer to the recordset values in the body with:

$RecipArray[$RecipIndex][0]["LodgeFirstname"]

Sign in to reply to this post

iain331081

Thanks Ray - that looks like its working.

Where before I had this to forma a date:

date('j F Y',strtotime($row_WADAlodges['LastLoginDate']));

What would the syntax be to format the date with:

$RecipArray[$RecipIndex][0]["LastLoginDate"];

Its not liking:

date('j F Y',strtotime($RecipArray[$RecipIndex][0]["Last_Login_Date"]);

Sign in to reply to this post

iain331081

Also seem to have the email subject repeated using:

$MailSubject = $MailSubject . "A new agent / buyer is following ";
$MailSubject = $MailSubject . $row_WADAlodges['Lodge'];

Tried changing it to just:

$MailSubject = $MailSubject . "A new agent / buyer is following" . $RecipArray[$RecipIndex][0]["Lodge"];

But its still doing it.

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...