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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Unable to include PhP variables in emails.

Thread began 6/09/2010 11:11 am by Mikel Jones | Last modified 6/10/2010 10:01 am by Jason Byrnes | 1419 views | 11 replies |

Mikel Jones

Unable to include PhP variables in emails.

I have several email templates that I need to display various values from a global php include. Even though the file is included in the email template the values do not show in the email sent to the end user.

From the following code you can see where I am including the php file with the values defined however they are always blank in the email when it arrives at it's destination.

NOTE: See attached file


Server variables are visible however all include values are empty.

There must be something i'm missing but I can't figure it out. I get no errors when the email is sent yet the included values are always empty.






--

Attached Files
EMailTemplate.txt
Sign in to reply to this post

Jason ByrnesWebAssist

Ok, I can see your trying to echo the value of the $SITEGlobal_SupportEMailLink variable from the ../../../WA_Globals/WA_Globals.php page:

<p style="padding: 0px; margin: 0px 0px 2px 0px;">If you continue to have problems logging in, please contact our <strong><?php echo( $SITEGlobal_SupportEMailLink );?></strong>.</p>


how is that defined in the WA_Globals.php page?

can you post the line from the globals page that defines that variable?

what product is this globals file you are using from?

Sign in to reply to this post

Mikel Jones

Originally Said By: Jason Byrnes
  can you post the line from the globals page that defines that variable?  



NOTE: The values are visible from the forgotten password web page. I placed some debug text in to see if they were there and they show up just fine. They just can't be seen from the email for some reason.

Pagelink: users_EmailPW.php

$SITEGlobal_Name = "RSVTours.com";
$SITEGlobal_LongName = "RS Virtual Tours";
$SITEGlobal_SiteSubtitle = "Real Estate Showcase & Posting Services";

$SITEGlobal_SupportEMailAddress = "support@rapiersoft.com";
$SITEGlobal_SupportEMailLink = "<a href=\"mailto:". $SITEGlobal_SupportEMailAddress ."\">". $SITEGlobal_LongName ." Support (". $SITEGlobal_SupportEMailAddress .")</a>";

$SITEGlobal_SalesEMailAddress = "sales@rapiersoft.com";
$SITEGlobal_SalesEMailLink = "<a href=\"mailto:". $SITEGlobal_SalesEMailAddress ."\">". $SITEGlobal_LongName ." Sales (". $SITEGlobal_SalesEMailAddress .")</a>";

Sign in to reply to this post

Jason ByrnesWebAssist

OK, I see that $SITEGlobal_SupportEMailLink is a compound value, what if you use one of the simpler variables like $SITEGlobal_SupportEMailAddress

<p style="padding: 0px; margin: 0px 0px 2px 0px;">If you continue to have problems logging in, please contact our <strong><?php echo( $SITEGlobal_SupportEMailAddress );?></strong>.</p>

Sign in to reply to this post

Mikel Jones

Originally Said By: Jason Byrnes
  OK, I see that $SITEGlobal_SupportEMailLink is a compound value, what if you use one of the simpler variables like $SITEGlobal_SupportEMailAddress

<p style="padding: 0px; margin: 0px 0px 2px 0px;">If you continue to have problems logging in, please contact our <strong><?php echo( $SITEGlobal_SupportEMailAddress );?></strong>.</p>  



Same problem. Notice $SITEGlobal_LongName does not show up either (it is not a compound variable, just a string) however it shows just fine from the page that sends the email <see the forgot password page link in previous post>.

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the users_EmailPW.php page so I can take a look

Sign in to reply to this post

Mikel Jones

Originally Said By: Jason Byrnes
  can you send a copy of the users_EmailPW.php page so I can take a look  



NOTE: I have several pages that send emails (contact pages, registration pages, email password page) and all the pages have the same problem with included values.


See attached file for the email password page.

Attached Files
EMailPassword.txt
Sign in to reply to this post

Jason ByrnesWebAssist

sorry, one more file I would like you to send so I can examine the code:
webassist/email/waue_users_EmailPW_1.php

Sign in to reply to this post

Mikel Jones

Originally Said By: Jason Byrnes
  sorry, one more file I would like you to send so I can examine the code:
webassist/email/waue_users_EmailPW_1.php  



See attached file.

Attached Files
EMailPwd1.txt
Sign in to reply to this post

Mikel Jones

Hmmm....


Notice the FROM address and SUBJECT are both included values.

$MailFrom = $SITEGlobal_SupportEMailAddress;
$MailSubject = $SITEGlobal_LongName. " Account Information";


BOTH of these values show correctly in the email I receive when using the forgotten password page. However any includes in the message body are missing.


Header:

From: support@rapiersoft.com
Subject: RS Virtual Tours Account Information


Body:

<missing name> Account Information


If you continue to have problems logging in, please contact our <missing email link>.

Make sure to include in the email as much information as you can about your account.

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