close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UE4.01 - mail sends, but database fields aren't shown in email

Thread began 6/03/2012 5:58 am by Sweens | Last modified 6/05/2012 1:47 pm by Jason Byrnes | 1904 views | 15 replies |

Sweens

UE4.01 - mail sends, but database fields aren't shown in email

Hi

Tried preparing several pages where fields from the database are inserted into the message, for example

Hi <firstname>,

However, the emails are sent to all the recipients in the recordset loop, but none of them have the personalised information displayed.

I know this has worked previously, though I am creating new pages.

Cheers
Chris

Sign in to reply to this post

Jason ByrnesWebAssist

Add this to the top of the email body template page:

<?php
global $RecipArray;
global $RecipIndex;
?>



and in the body and for the email log settings use:

<?php echo($RecipArray[$RecipIndex][0]["[yourColumnName]"]); ?>



and you can add any references to the recordset columns used as the To loop.

Sign in to reply to this post

Sweens

Hi Jason

Could you clarify which page is which?

Let's say I have sendmessage.php as the web page
and
waue_sendmessage_1.php as the pages which contains the message.

Which bit of code goes on which page? What is the 'log' page?

Sorry for being dim!

Cheers

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

the code goes on the page that contains the message:
waue_sendmessage_1.php


this is also the log page.

Sign in to reply to this post

Sweens

Thanks Jason - but it make no difference!

Cheers
Chris

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of your page and the webassist/email folder.

Sign in to reply to this post

Sweens

Thanks Jason - requested attached.

Cheers
Chris

Attached Files
email.zip
sendmessage-test.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in the webassist/email/waue_sendmessage_1.php file, you need to change:

php:
$MailBody = $MailBody .  $row_rsEmailRecipients['FirstName'];




to:

php:
$MailBody = $MailBody .  $RecipArray[$RecipIndex][0]['FirstName']];
Sign in to reply to this post

Sweens

Hi Jason
Now the page goes blank and freezes after the 'send' button is pressed. It doesn't go to the 'thanks' page and no email is sent.

Cheers

Chris

Sign in to reply to this post

Sweens

Hi jason

Noticed that
$MailBody = $MailBody . $RecipArray[$RecipIndex][0]['FirstName']];

appears to have an extra closing ], so I removed that and the email sent.

However, instead of getting the recipients name, ALL messages start

Hi r

where 'r' is in the place of the name.

HTH
Cheers
Chris

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